Skip to content

fix: drop the component suffix from the release branch name#147

Merged
ThomasK33 merged 1 commit into
mainfrom
fix/short-release-branch
Jun 12, 2026
Merged

fix: drop the component suffix from the release branch name#147
ThomasK33 merged 1 commit into
mainfrom
fix/short-release-branch

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

The standing release PR's head branch was release-please--branches--main--components--agent-tty: release-please's stock node strategy always embeds the package name in the branch, even with include-component-in-tag: false (verified in strategies/base.jsgetBranchComponent() has no config hook). This overrides getBranchComponent() in the existing CommuniqueNodeStrategy so the branch component follows the tag setting, giving the plain release-please--branches--main.

Safety / migration

  • buildRelease() parses the merged PR's branch name and silently skips release creation on a component mismatch (warn + return in strategies/base.js:389). New unit tests pin the round-trip: BranchName.ofTargetBranch('main') ⇄ parse, with getComponent() === undefined.
  • Migration: any release PR still open on the old component-suffixed branch after this merges must be closed, never merged (a merge would produce no release). The next push to main recreates it on the new branch. There is no open release PR right now (chore(release): 0.4.3 #146 just merged and released), so merging this promptly avoids the situation entirely — the 0.4.4 release PR that this merge itself triggers will already use the short branch.
  • If include-component-in-tag is ever flipped to true, the branch follows automatically (tested).

🤖 Generated with Claude Code

The stock node strategy always embeds the package name in the release
branch (release-please--branches--main--components--agent-tty) even with
include-component-in-tag: false. Override getBranchComponent() to follow
the tag setting, yielding the plain release-please--branches--main.

buildRelease() skips release creation when a merged PR's branch component
mismatches the configured one, so any release PR still open on the old
component-suffixed branch must be closed (not merged) after this lands; the
next push to main recreates it on the new branch. There is no open release
PR at the time of writing.

Change-Id: I4961eeb13d5149e7d84fb0c74de53875a89d6c1f
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 merged commit 04be56e into main Jun 12, 2026
20 of 22 checks passed
@ThomasK33 ThomasK33 deleted the fix/short-release-branch branch June 12, 2026 13:06
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