Merge pull request #994 from pikasTech/fix/993-gh-pr-create-merge-next
fix: gh pr create Next 默认使用 merge
This commit is contained in:
@@ -276,6 +276,8 @@ PR 正文
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`pr create` 成功后的 Next 默认提示使用 `gh pr merge ... --merge --delete-branch`。只有确认不需要保留 ancestry 或 merge parent history 时,才显式改用 `--squash`。
|
||||||
|
|
||||||
### 合并
|
### 合并
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -133,10 +133,13 @@ export function renderPrCreateTable(result: GitHubCommandResult): string {
|
|||||||
"Next:",
|
"Next:",
|
||||||
];
|
];
|
||||||
if (status === "created" && number !== "-") {
|
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(` 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 {
|
} else {
|
||||||
lines.push(" rerun without --dry-run to create the PR");
|
lines.push(" rerun without --dry-run to create the PR");
|
||||||
|
lines.push(` after creation: bun scripts/cli.ts gh pr merge <pr-number> --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("", "Disclosure:");
|
||||||
lines.push(" default view is a bounded table; use gh pr view/preflight --full for structured metadata.");
|
lines.push(" default view is a bounded table; use gh pr view/preflight --full for structured metadata.");
|
||||||
|
|||||||
Reference in New Issue
Block a user