From cfd4f623af7b56eef382dd3ba989822bfed001ae Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 26 Jun 2026 07:14:14 +0000 Subject: [PATCH] fix: default pr create next to merge --- .agents/skills/unidesk-gh/SKILL.md | 2 ++ scripts/src/gh/pr-commands.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.agents/skills/unidesk-gh/SKILL.md b/.agents/skills/unidesk-gh/SKILL.md index 8ea054dc..a4b459ab 100644 --- a/.agents/skills/unidesk-gh/SKILL.md +++ b/.agents/skills/unidesk-gh/SKILL.md @@ -276,6 +276,8 @@ PR 正文 EOF ``` +`pr create` 成功后的 Next 默认提示使用 `gh pr merge ... --merge --delete-branch`。只有确认不需要保留 ancestry 或 merge parent history 时,才显式改用 `--squash`。 + ### 合并 ```bash diff --git a/scripts/src/gh/pr-commands.ts b/scripts/src/gh/pr-commands.ts index 093b780c..d81bd8f9 100644 --- a/scripts/src/gh/pr-commands.ts +++ b/scripts/src/gh/pr-commands.ts @@ -133,10 +133,13 @@ export function renderPrCreateTable(result: GitHubCommandResult): string { "Next:", ]; if (status === "created" && number !== "-") { - 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 merge ${number} --repo ${ghText(result.repo)} --merge --delete-branch`); lines.push(` bun scripts/cli.ts gh pr preflight ${number} --repo ${ghText(result.repo)} --full`); + lines.push(" Use --squash only when ancestry and merge-parent history are intentionally disposable."); } else { lines.push(" rerun without --dry-run to create the PR"); + lines.push(` after creation: bun scripts/cli.ts gh pr merge --repo ${ghText(result.repo)} --merge --delete-branch`); + lines.push(" Use --squash only when ancestry and merge-parent history are intentionally disposable."); } lines.push("", "Disclosure:"); lines.push(" default view is a bounded table; use gh pr view/preflight --full for structured metadata.");