fix: point pr create next step to one-command merge (#655)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
+4
-3
@@ -4821,7 +4821,7 @@ function prMetadataSummary(metadata: GitHubPullRequestGraphqlMetadata): Record<s
|
|||||||
|
|
||||||
function prMergeBoundary(): Record<string, unknown> {
|
function prMergeBoundary(): Record<string, unknown> {
|
||||||
return {
|
return {
|
||||||
runnerAllowed: ["pr create", "pr update/edit", "pr comment", "pr read/view", "pr close", "pr merge after explicit command authorization and preflight success"],
|
runnerAllowed: ["pr create", "pr update/edit", "pr comment", "pr read/view", "pr close", "pr merge after explicit command authorization"],
|
||||||
ordinaryRunnerFinalActionAllowed: true,
|
ordinaryRunnerFinalActionAllowed: true,
|
||||||
commanderRequiredWhen: ["conflicts", "failed required checks", "production/runtime/release/security/database scope", "ambiguous task boundary"],
|
commanderRequiredWhen: ["conflicts", "failed required checks", "production/runtime/release/security/database scope", "ambiguous task boundary"],
|
||||||
hostAllowedToolsAfterReview: ["bun scripts/cli.ts gh pr merge", "GitHub UI merge/close"],
|
hostAllowedToolsAfterReview: ["bun scripts/cli.ts gh pr merge", "GitHub UI merge/close"],
|
||||||
@@ -5025,7 +5025,7 @@ function prPreflightPolicy(repo: string, number: number): Record<string, unknown
|
|||||||
mergeCommand: `bun scripts/cli.ts gh pr merge ${number} --repo ${repo} --merge`,
|
mergeCommand: `bun scripts/cli.ts gh pr merge ${number} --repo ${repo} --merge`,
|
||||||
unideskCliMergeSupported: true,
|
unideskCliMergeSupported: true,
|
||||||
ordinaryRunnerFinalActionAllowed: true,
|
ordinaryRunnerFinalActionAllowed: true,
|
||||||
note: "This preflight only reads GitHub auth, PR metadata, mergeability, and status checks; use gh pr merge only after this command reports ready and the task boundary allows merge.",
|
note: "This preflight only reads GitHub auth, PR metadata, mergeability, and status checks for diagnosis; gh pr merge performs its own guarded readiness check and does not require this preflight step.",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5785,7 +5785,8 @@ function renderPrCreateTable(result: GitHubCommandResult): string {
|
|||||||
"Next:",
|
"Next:",
|
||||||
];
|
];
|
||||||
if (status === "created" && number !== "-") {
|
if (status === "created" && number !== "-") {
|
||||||
lines.push(` bun scripts/cli.ts gh pr preflight ${number} --repo ${ghText(result.repo)}`);
|
lines.push(` bun scripts/cli.ts gh pr merge ${number} --repo ${ghText(result.repo)} --squash --delete-branch`);
|
||||||
|
lines.push(` bun scripts/cli.ts gh pr preflight ${number} --repo ${ghText(result.repo)} --full`);
|
||||||
} else {
|
} else {
|
||||||
lines.push(" rerun without --dry-run to create the PR");
|
lines.push(" rerun without --dry-run to create the PR");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user