A pull request whose base moved is refused at the merge; bring the branch up to date before it #221
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Run 88 on cmoriarty/aurora-links3 (pull request #10) failed at
git.pr.merge: "Forgejo refused to merge cmoriarty/aurora-links3#10 for now: Please try again later". Another run's pull request had merged intomainwhile this one was being built, so the branch no longer merged cleanly (mergeable: false; Forgejo's ownPOST /pulls/10/updateanswers 409). Forgejo shows no "Update branch" button either, because it only offers one when the update is clean.git.pr.mergewaits on checks and retries, but it never brings the branch up to date with its base, so a base that moved is a dead end that only a person can clear by hand.(
agent.merge-prin the spine is onlyhuman.merge-prshown under auto-approve; it merges nothing.)Wanted
Bring the run's branch up to date with its base before the pull request reaches the merge gate, in the step after
git.pr.open:.osf/pr.json, sogit.pr.merge's moved-head belt still holds and checks run once on the final head.Also let
git.pr.mergecatch a base that moved while the gate waited, with Forgejo's update for the clean case.Run 88 itself needs its conflict resolved by hand.
Shipped in
c9313ba(archived infb625b1) and live on production.git.pr.openin every built-in pipeline:git.sync-basefetches the base from the forge itself (a run'soriginis osfd's copy, as old as the clone) and merges it;agent.sync-resolveruns only on a conflict, resolves and stages the files, and never commits;git.commit.synccommits the merge. The pull request opens on a head that has the base, so its checks run once on what will merge.git.pr.mergenow fails at once when Forgejo reads the pull request as not mergeable, naming the base and the conflict instead of waiting on "try again later". When it is only behind its base, the step asks Forgejo to update the branch and records the new head in.osf/pr.json.Run 88 itself is not repaired by this: its pull request (aurora-links3#10) still has to be merged with main by hand.