chore: derive release bump only from the title bang marker#48
Merged
Conversation
The release workflow scanned the PR title and body for the conventional-commits major-bump phrase and forced a major bump on any match. Prose that merely referenced the phrase, including a sentence stating there was none, tripped it. This is the same footgun already fixed in getstream-ruby and stream-py. Treat the `!` marker in the conventional-commits title (e.g. `feat!:`) as the sole major signal and stop reading the PR body entirely. Drop the now-unused --body / --body-file options and the body plumbing in release.yml.
Bump is derived from the PR title `!` marker; the body is no longer scanned, so a prose mention does not force a major.
The release guide still documented BREAKING CHANGE body scanning; match README and bump_version.php, which derive semver only from the title `!` marker. Co-authored-by: Cursor <cursoragent@cursor.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.
Problem
scripts/release/bump_version.php(determineBumpType) forced a major bump whenever the conventional-commits major-bump phrase appeared anywhere in the PR title or body (a regex over free text). Any PR that merely references the phrase, including a sentence saying there is none, trips it. Same footgun already fixed in getstream-ruby (#66) and stream-py (#268).Fix
Trust only the conventional-commits
!marker in the title (e.g.feat!:) as the major signal. Stop reading the PR body entirely, and remove the now-dead--body/--body-fileoptions plus the body plumbing inrelease.yml.Bump rules after this change (title-only):
feat!:/fix!:/type(scope)!:-> majorfeat:-> minorfix:/bug:-> patchThis PR is titled
chore:so it does not trigger a release.Verification
Ran the real script across cases via a PHP harness (escapeshellarg, literal titles):
feat:-> minor;feat!:/feat(mod)!:/fix!:-> major;fix:/bug:-> patch;chore:-> nonefeat:title whose body references the major-bump phrase -> minor (the regression); a prose-only title -> nonephp -lclean;make lint(PHPStan) clean.