feat(core,node-gha): resolve last release tag through project to support bundled release commits#165
Merged
Merged
Conversation
…ort bundled release commits
Coverage Report for CI Build 28791044610Coverage increased (+0.6%) to 60.49%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
The problem
node-gharelease tags point to bundled commits on the release branches (latest,vN) which are never merged back to the source branch. Tag discovery in bump, changelog generation, and maintenance branch detection walks the current branch history (git log --decorate), so those tags are invisible:feat!released in 2.0.0 turns the next patch into a false 3.0.0);Real-world example: TrigenSoftware/simple-release-action#25 proposed
3.0.0with a duplicated breaking change instead of2.0.1.The fix
Project#getLastReleaseTag(options)method — the single point of last release tag resolution. Default implementation keeps the current behavior (getLastSemverTagover branch history). It is now used bygetNextVersion(first release detection + explicit tag forBumper), changelog generation inbump(commits.from+context.previousTag),getMaintenanceBranches, and fixed monorepo first release detection.getLastReleaseTag— walks all refs viagetSemverTags({ all: true })(new option in @conventional-changelog/git-client 3.1.0, feat(git-client): add all option to getTags to walk all refs conventional-changelog/conventional-changelog#1501) in commit date order and returns the first tag whose commit or parent is reachable fromHEAD. A bundled release commit is amended from the release commit, so its parent lands in the source branch; the reachability check also keeps maintenance branches isolated from other branches' tags.Covered by node-gha specs with a real bundled release (
publish()into a bare remote): last tag resolution on the source branch, patch bump + changelog content after an action release, and per-branch resolution on a maintenance branch.Note
Release tags published by node-gha before 3.0.3 (#157) are parentless root commits — they share no history with the source branch and cannot be matched by reachability. Such tags are skipped; e.g. simple-release-action's
v2.0.0needs a one-time re-tag with a proper parent.🤖 Generated with Claude Code