Skip to content

fix(release): record the standing PR's base after resetting to it - #713

Merged
goosewobbler merged 2 commits into
mainfrom
fix/standing-pr-base-sha
Oct 23, 2026
Merged

goosewobbler merged 2 commits into
mainfrom
fix/standing-pr-base-sha

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Description

A label or body edit on the standing PR re-runs standing-pr update on a pull_request event, which checks out GitHub's temporary merge commit for the PR. Two things went wrong from there:

  • The manifest's baseSha was that merge commit. It was read from HEAD before the release branch was reset. standing-pr publish refuses unless baseSha is 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.
  • The dry-run analysis read the release branch's already-bumped versions. The merge commit contains them, so the preview logged a second bump (0.43.0). The write run resets first, so the branch and manifest were right.

Fix:

  • baseSha is 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.
  • Update runs on pull_request events 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 in ci-setup.md. On other events the expression is empty and checkout behaves as before.
  • Corrected the doc comment that said a pull_request run checks out the release-preparation commit.

Merging this to main re-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 feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

  • New test: HEAD reads pr-merge-commit until resetHard, then base-tip; the manifest records base-tip. It fails with the old ordering.
  • Release unit suite (847), typecheck, root lint and the examples-smoke generation check pass.
  • Confirmed on chore: release v0.42.0 #614: its manifest's baseSha is ce018612, "Merge 77bfe70 into e706869", GitHub's merge commit for the PR.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence 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 baseSha after resetting the release branch to the base tip.

  • Standing-PR updates analyze the base branch and record its 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]
Loading

Reviews (1) · Last reviewed commit: "fix(release): record the standing PR's b..." · Reviewed by Greptile

`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>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
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

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.41.3

Changed

  • drop comments the base-branch checkout and its test already explain
  • let the standing-PR update post its commit status (PR #714)

Fixed

  • record the standing PR's base after resetting to it (release)

All packages → 0.41.3 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.41.3 0.42.0

Updated automatically by ReleaseKit

…plain

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@goosewobbler
goosewobbler merged commit 8223477 into main Oct 23, 2026
33 checks passed
@goosewobbler
goosewobbler deleted the fix/standing-pr-base-sha branch October 23, 2026 16:18
@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant