fix(maint): keep PR landing on squash

This commit is contained in:
Vincent Koc
2026-06-24 09:01:09 +08:00
parent 54c0048d6c
commit da15cf48bf
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -225,7 +225,7 @@ merge_run() {
}
if ! gh pr merge "$pr" \
--rebase \
--squash \
--match-head-commit "$PREP_HEAD_SHA" \
>.local/merge-output.log 2>&1
then
@@ -290,7 +290,7 @@ merge_run() {
for attempt in 1 2 3; do
if comment_output=$(
{
echo "Merged via rebase."
echo "Merged via squash."
echo
echo "- Prepared head SHA: [$PREP_HEAD_SHA]($prep_sha_url)"
echo "- Landed commit: [$landed_sha]($landed_sha_url)"
+5 -5
View File
@@ -32,13 +32,13 @@ describe("scripts/pr wrappers", () => {
expect(script).toContain('exec "$base" merge-run "$pr"');
});
it("uses the repository-approved rebase landing method", () => {
it("uses the repository-approved squash landing method", () => {
const script = readScript("scripts/pr-lib/merge.sh");
expect(script).toContain("--rebase");
expect(script).not.toContain("--squash");
expect(script).toContain("Merged via rebase.");
expect(script).not.toContain("Merged via squash.");
expect(script).toContain("--squash");
expect(script).not.toContain("--rebase");
expect(script).toContain("Merged via squash.");
expect(script).not.toContain("Merged via rebase.");
});
it("keeps prepare wrapper modes delegated to the main PR helper", () => {