feat(FN-4271): create tracking issue for github-imported tasks

Adds a tracking issue mechanism for GitHub-imported tasks, creating an internal Fusion task to track the import lifecycle. The TaskCard component gains visibility into tracking status, backed by new tests in both TaskCard and GitHub tracking modules.

Fusion-Task-Id: FN-4271
This commit is contained in:
Fusion
2026-05-13 00:25:15 -07:00
committed by gsxdsm
parent 24e964274e
commit 991776b80c
6 changed files with 102 additions and 10 deletions

View File

@@ -225,6 +225,37 @@ describe("maybeCreateTrackingIssue", () => {
}));
});
it("creates issue for github_import tasks when tracking is explicitly enabled", async () => {
const linkGithubIssue = vi.fn();
const recordActivity = vi.fn();
const result = await maybeCreateTrackingIssue(buildTask({
sourceType: "github_import",
title: "Imported issue follow-up",
description: "Short body",
githubTracking: { enabled: true },
}), {
taskStore: { linkGithubIssue, recordActivity } as any,
projectSettings: {},
globalSettings: { githubTrackingDefaultRepo: "o/r" } as any,
rootDir,
logger: console,
});
expect(createIssueMock).toHaveBeenCalledWith(expect.objectContaining({
owner: "o",
repo: "r",
title: "[FN-1] Imported issue follow-up",
body: "Fusion task: FN-1\n\nShort body",
}));
expect(result).toMatchObject({
created: true,
issue: { owner: "o", repo: "r", number: 12, htmlUrl: "https://github.com/o/r/issues/12" },
});
expect(linkGithubIssue).toHaveBeenCalledWith("FN-1", expect.objectContaining({ owner: "o", repo: "r", number: 12 }));
expect(recordActivity).toHaveBeenCalled();
});
it("uses the AI summarizer when the title is missing and a summarizer model is configured", async () => {
const linkGithubIssue = vi.fn();
const recordActivity = vi.fn();