ci: re-anchor next-release PR after the release is published#9
Open
androosio wants to merge 1 commit into
Open
ci: re-anchor next-release PR after the release is published#9androosio wants to merge 1 commit into
androosio wants to merge 1 commit into
Conversation
release-please computes the next-release PR in the same pass that creates the release for a just-merged release PR. On that pass the new release is still a draft (the publish job only flips it afterwards), and a draft GitHub release has no tag and isn't recognised as the latest release -- so release-please mis-anchors on an older release and opens a bogus PR that re-lists already-released commits (observed as the spurious "release 1.2.0" PR after v1.1.2). Add a reconcile job that runs after publish: close any release PR left open from the draft-window pass, then re-run release-please against the now-published release so it reopens a correctly-anchored PR only if something genuinely remains unreleased. Keeps draft:true (the release stays private until the signed APK is attached) while removing the race. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Every time a release PR is merged, Release Please opens a spurious next-release PR that re-lists already-released commits (e.g. the bogus
chore(main): release 1.2.0seen after v1.1.2 shipped).Root cause, confirmed from the run log (
⚠ Expected 1 releases, only found 0/looking for tagName: v1.1.2): therelease-pleasejob computes the next release PR in the same pass that creates the release for the just-merged release PR. At that moment the new release is still a draft (thepublishjob only flips it to published afterwards, once the signed APK is attached). A draft GitHub release has no git tag and isn't recognised as "the latest release", so Release Please falls back to an older release and re-collects already-released commits.A corrected pass alone won't retract the stale PR (verified: re-running Release Please after publish left the bad PR open).
Fix
New
reconcilejob, gated onrelease_created, running afterpublish:release-please--branches--mainPR left open from the draft-window pass (delete its branch).release-please-actionagainst the now-published release, so it reopens a correctly-anchored PR only if something genuinely landed during the release run.Keeps
draft: true(release stays private until the APK is attached) while removing the race.Notes
release_created == true).🤖 Generated with Claude Code