Skip to content

chore: derive release bump only from the title bang marker#48

Merged
itsmeadi merged 3 commits into
masterfrom
chore/release-title-only-bump
Jun 23, 2026
Merged

chore: derive release bump only from the title bang marker#48
itsmeadi merged 3 commits into
masterfrom
chore/release-title-only-bump

Conversation

@mogita

@mogita mogita commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

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-file options plus the body plumbing in release.yml.

Bump rules after this change (title-only):

  • feat!: / fix!: / type(scope)!: -> major
  • feat: -> minor
  • fix: / bug: -> patch
  • anything else -> no release

This 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: -> none
  • a feat: title whose body references the major-bump phrase -> minor (the regression); a prose-only title -> none

php -l clean; make lint (PHPStan) clean.

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>
@itsmeadi itsmeadi merged commit 1c1d8b7 into master Jun 23, 2026
7 checks passed
@itsmeadi itsmeadi deleted the chore/release-title-only-bump branch June 23, 2026 10:59
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.

2 participants