Skip to content

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

Merged
mogita merged 1 commit into
mainfrom
feat/release-title-only-bump
Jun 22, 2026
Merged

chore: derive release bump only from the title bang marker#268
mogita merged 1 commit into
mainfrom
feat/release-title-only-bump

Conversation

@mogita

@mogita mogita commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

scripts/release/bump_version.py (determine_bump_type) forced a major bump whenever the substring "BREAKING CHANGE(S)" appeared anywhere in the PR title or body (/BREAKING[ -]CHANGES?/i over free text). Any PR that merely mentions the phrase, including a sentence saying there is none, trips it. This is the same footgun that mis-cut a major release in getstream-ruby.

Fix

Trust only the conventional-commits ! marker in the title (e.g. feat!:) as the breaking-change 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

Release note

This PR is intentionally titled feat: so the auto-release cuts a minor (latest tag v3.4.0 -> v3.5.0), which matches the version = "3.5.0" already set in pyproject.toml and publishes the features merged since v3.4.0. A fix: title would have computed 3.4.1 and regressed pyproject.

Verification

Loaded the real module and tested determine_bump_type directly:

  • feat: -> minor, feat!: / feat(mod)!: / fix!: -> major, fix: / bug: -> patch, chore: -> none
  • feat: mentions BREAKING CHANGE in prose -> minor (the regression), BREAKING CHANGES: prose title -> none

ruff check and ruff format --check: clean.

Summary by CodeRabbit

  • Chores
    • Simplified the release version-bump determination process to rely solely on PR title indicators, removing unnecessary PR body extraction from the release workflow.

The release workflow scanned the PR title and body for "BREAKING CHANGE(S)"
and forced a major bump on any match. Prose that merely mentioned the phrase,
including a sentence stating there was no breaking change, tripped it. This is
the same footgun that mis-cut a major in getstream-ruby.

Treat the `\!` marker in the conventional-commits title (e.g. `feat\!:`) as the
sole breaking-change signal and stop reading the PR body entirely. Drop the
now-unused --body / --body-file options and the body plumbing in release.yml.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR strips PR-body-based breaking-change detection from the version bump pipeline. determine_bump_type is simplified to title-only input, the resolve_body helper and --body CLI argument are removed from the script, and the release workflow drops the temporary-file step that previously passed the PR body to the script.

Changes

Remove PR body from version bump detection

Layer / File(s) Summary
Simplify determine_bump_type and remove body helpers
scripts/release/bump_version.py
determine_bump_type signature reduced to (title: str), breaking-change detection now relies solely on the ! marker. resolve_body helper deleted, --body CLI argument removed, and the auto-release call site updated to determine_bump_type(args.title).
Remove body-file extraction from release workflow
.github/workflows/release.yml
The "Determine version bump" step now calls bump_version.py --title "$PR_TITLE" only, dropping the four lines that extracted the PR body into a temp file and passed it via --body-file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • GetStream/stream-py#254: Introduced the bump_version.py script and the release workflow step that this PR modifies, specifically the determine_bump_type function and --body-file argument that are now removed.

Poem

🐇 Hop, hop, the body's gone,
Just the title carries on!
No more temp files, no more fuss,
One ! bang is enough for us.
Less is more, the rabbit said,
Now the bump check runs ahead! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: deriving release bump determination solely from the PR title bang marker, which is the core modification across both modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-title-only-bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mogita mogita changed the title feat: derive release bump only from the title bang marker chore: derive release bump only from the title bang marker Jun 22, 2026
@mogita mogita merged commit 97c27cc into main Jun 22, 2026
39 of 40 checks passed
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