mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Add routines automation workflows
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
7a652b8998
commit
8f5196f7d6
35 changed files with 25977 additions and 5 deletions
|
|
@ -27,6 +27,7 @@ import {
|
|||
documentService,
|
||||
logActivity,
|
||||
projectService,
|
||||
routineService,
|
||||
workProductService,
|
||||
} from "../services/index.js";
|
||||
import { logger } from "../middleware/logger.js";
|
||||
|
|
@ -49,6 +50,7 @@ export function issueRoutes(db: Db, storage: StorageService) {
|
|||
const executionWorkspacesSvc = executionWorkspaceService(db);
|
||||
const workProductsSvc = workProductService(db);
|
||||
const documentsSvc = documentService(db);
|
||||
const routinesSvc = routineService(db);
|
||||
const upload = multer({
|
||||
storage: multer.memoryStorage(),
|
||||
limits: { fileSize: MAX_ATTACHMENT_BYTES, files: 1 },
|
||||
|
|
@ -236,6 +238,10 @@ export function issueRoutes(db: Db, storage: StorageService) {
|
|||
projectId: req.query.projectId as string | undefined,
|
||||
parentId: req.query.parentId as string | undefined,
|
||||
labelId: req.query.labelId as string | undefined,
|
||||
originKind: req.query.originKind as string | undefined,
|
||||
originId: req.query.originId as string | undefined,
|
||||
includeRoutineExecutions:
|
||||
req.query.includeRoutineExecutions === "true" || req.query.includeRoutineExecutions === "1",
|
||||
q: req.query.q as string | undefined,
|
||||
});
|
||||
res.json(result);
|
||||
|
|
@ -855,6 +861,7 @@ export function issueRoutes(db: Db, storage: StorageService) {
|
|||
res.status(404).json({ error: "Issue not found" });
|
||||
return;
|
||||
}
|
||||
await routinesSvc.syncRunStatusForIssue(issue.id);
|
||||
|
||||
// Build activity details with previous values for changed fields
|
||||
const previous: Record<string, unknown> = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue