From bf790b1f9408ad6692107d105766e3e4556b7c34 Mon Sep 17 00:00:00 2001 From: mike-diff Date: Tue, 23 Jun 2026 19:22:09 -0700 Subject: [PATCH] ci(dispatch): force-push the disposable dispatch branch Re-dispatching an issue whose prior PR was closed (not deleted) failed at the push step with non-fast-forward, because the remote dispatch/issue-N branch still held the closed PR's commit. A dispatch branch is a throwaway owned by one issue, so the new run must replace it, not be rejected by it. Force-push makes each dispatch authoritative for its branch. --- .github/workflows/dispatch.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 8caef6f..2a32481 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -168,7 +168,12 @@ jobs: else git commit -m "dispatch: resolve #${ISSUE_NUMBER}" -q fi - git push -u origin "$BRANCH" + # Force-push: a dispatch branch is a disposable throwaway owned by one + # issue. Re-dispatching the same issue (e.g. after a closed prior PR + # whose branch was not deleted) must replace the remote branch, not be + # rejected by it. There is never independent work on a dispatch branch + # that a fresh run would not reproduce. + git push -u --force origin "$BRANCH" gh pr create \ --base "$BASE" \