Repository navigation
fix(release): record the standing PR's base after resetting to it - #713
Merged
Merged
Conversation
`standing-pr update` recorded the manifest's baseSha from HEAD before resetting the release branch. On a label- or edit-triggered run, HEAD is GitHub's temporary merge commit for the PR, which is never in the merged history, so `standing-pr publish` would refuse the release. The baseSha is now read after the reset, and update runs on pull_request events check out the base branch, so the dry-run analysis also reads the base instead of the release branch's already-bumped versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 22h 6m · ✅ ready to merge Release Preview — v0.41.2 → v0.41.3
These changes will be added to the release PR (#614) when merged: Changelogmonorepo 0.41.2 → 0.41.3
After merge — predicted release
Updated automatically by ReleaseKit |
…plain Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Description
A label or body edit on the standing PR re-runs
standing-pr updateon apull_requestevent, which checks out GitHub's temporary merge commit for the PR. Two things went wrong from there:baseShawas that merge commit. It was read from HEAD before the release branch was reset.standing-pr publishrefuses unlessbaseShais an ancestor of the merged commit, and a temporary merge commit never is, so merging after such a run would fail the publish. The open release PR (chore: release v0.42.0 #614) has this manifest now.0.43.0). The write run resets first, so the branch and manifest were right.Fix:
baseShais read after the reset, so it's the base branch's tip whatever was checked out. This alone fixes publishing for consumers on older workflow copies.pull_requestevents check out the base branch (ref: ${{ github.event.pull_request.base.ref }}), in this repo's reusable workflow, the consumer template, the standing-PR example and the copy inci-setup.md. On other events the expression is empty and checkout behaves as before.pull_requestrun checks out the release-preparation commit.Merging this to
mainre-runs the standing-PR update on a push, which rebuilds #614's manifest with the right base.Related Issue(s)
None; found in #614's label-triggered run.
Type of Change
feat— New featurefix— Bug fixdocs— Documentation changerefactor— Code refactoringtest— Adding or updating testschore— Maintenance, dependencies, toolingScope
@releasekit/version@releasekit/notes@releasekit/publish@releasekit/release@releasekit/config@releasekit/coreChecklist
pnpm lint)pnpm test)pnpm typecheck)Testing Notes
pr-merge-commituntilresetHard, thenbase-tip; the manifest recordsbase-tip. It fails with the old ordering.baseShaisce018612, "Merge 77bfe70 into e706869", GitHub's merge commit for the PR.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the saved baseline now matches the base used to write release changes.Summary
Records the standing PR’s
baseShaafter resetting the release branch to the base tip.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Check out base branch on PR events] --> B[Run dry-run analysis] B --> C[Reset release branch to base tip] C --> D[Read baseSha] D --> E[Write version changes] E --> F[Save manifest] F --> G[After merge, check baseline ancestry]Reviews (1) · Last reviewed commit: "fix(release): record the standing PR's b..." · Reviewed by Greptile