fix: drop the component suffix from the release branch name#147
Merged
Conversation
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>
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.
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 withinclude-component-in-tag: false(verified instrategies/base.js—getBranchComponent()has no config hook). This overridesgetBranchComponent()in the existingCommuniqueNodeStrategyso the branch component follows the tag setting, giving the plainrelease-please--branches--main.Safety / migration
buildRelease()parses the merged PR's branch name and silently skips release creation on a component mismatch (warn+returninstrategies/base.js:389). New unit tests pin the round-trip:BranchName.ofTargetBranch('main')⇄ parse, withgetComponent() === undefined.mainrecreates 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.include-component-in-tagis ever flipped totrue, the branch follows automatically (tested).🤖 Generated with Claude Code