ci(dispatch): force-push the disposable dispatch branch#37
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Re-dispatching an issue whose prior PR was closed (not deleted) failed at the push step with
non-fast-forward. The remotedispatch/issue-Nbranch still held the closed PR's commit, so the new run's push was rejected. This caused run 28068895061 on issue #33 to fail at step 11 even though the agent (step 10) succeeded.Changes
.github/workflows/dispatch.yml: the push in the commit/open-PR step is nowgit push -u --force.How to test
Re-dispatch an issue that already has a closed PR with a surviving branch (issue #33 is the live case). Before this change the push fails with non-fast-forward; after it, the new run replaces the remote branch and opens the PR.
Verification
go build ./...pass. YAML re-parsed, 12 steps intact, no em dashes. Force-push is safe here because a dispatch branch is a disposable throwaway owned by one issue: there is never independent work on it that a fresh run would not reproduce.Closes nothing (workflow fix).