feat(FN-3202): handle manual PR linking and feedback follow-ups
- Add scheduler logic to create dependency-linked follow-up tasks when actionable PR feedback remains after a PR is merged or closed - Update engine runtime/project wiring to support manual PR create flows and branch publish behavior for fusion/<task-id> - Add dashboard route coverage for manual PR creation/linking behavior and corresponding engine/runtime tests - Document manual PR branch conventions and follow-up behavior in task management and dashboard docs Fusion-Task-Id: FN-3202
This commit is contained in:
@@ -2854,21 +2854,27 @@ export function registerGitGitHubRoutes(ctx: ApiRoutesContext): void {
|
||||
});
|
||||
}
|
||||
|
||||
// Create the PR
|
||||
const client = new GitHubClient();
|
||||
const existingPr = await client.findPrForBranch({ head: branchName, state: "all", owner, repo });
|
||||
|
||||
const prInfo = await client.createPr({
|
||||
owner,
|
||||
repo,
|
||||
title,
|
||||
body,
|
||||
head: branchName,
|
||||
base,
|
||||
});
|
||||
let prInfo: PrInfo;
|
||||
if (existingPr) {
|
||||
prInfo = existingPr;
|
||||
} else {
|
||||
await runGitCommand(["push", "-u", "origin", branchName], scopedStore.getRootDir(), 60_000);
|
||||
prInfo = await client.createPr({
|
||||
owner,
|
||||
repo,
|
||||
title,
|
||||
body,
|
||||
head: branchName,
|
||||
base,
|
||||
});
|
||||
}
|
||||
|
||||
// Store PR info
|
||||
await scopedStore.updatePrInfo(task.id, prInfo);
|
||||
await scopedStore.logEntry(task.id, "Created PR", `PR #${prInfo.number}: ${prInfo.url}`);
|
||||
await scopedStore.logEntry(task.id, existingPr ? "Linked existing PR" : "Created PR", `PR #${prInfo.number}: ${prInfo.url}`);
|
||||
|
||||
res.status(201).json(prInfo);
|
||||
} catch (err: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user