feat(FN-3953): enable tracking issue creation on task edit and document the

Implements GitHub tracking issue creation on PATCH operations for FN-3953, with accompanying test coverage and documentation updates for edit-time tracking.

Fusion-Task-Id: FN-3953
This commit is contained in:
Fusion
2026-05-10 14:48:52 -07:00
committed by gsxdsm
parent 5f4fd222da
commit cedf07c1fe
5 changed files with 117 additions and 5 deletions

View File

@@ -1804,6 +1804,22 @@ export function registerTaskWorkflowRoutes(ctx: ApiRoutesContext, deps: TaskWork
}
const task = await scopedStore.updateTask(req.params.id, updates);
const manualUnlinkRequested =
hasBodyField("githubTracking") &&
validatedGithubTracking !== null &&
typeof validatedGithubTracking === "object" &&
validatedGithubTracking.issue === null;
if (hasBodyField("githubTracking") && !manualUnlinkRequested) {
await maybeCreateTaskTrackingIssue(scopedStore, task, options?.githubToken);
const refreshedTask = await scopedStore.getTask(req.params.id, {
activityLogLimit: TASK_DETAIL_ACTIVITY_LOG_LIMIT,
});
res.json(trimTaskDetailActivityLog(refreshedTask));
return;
}
res.json(task);
} catch (err: unknown) {
if (err instanceof ApiError) {