Skip to content

Feat/next version#2036

Open
woile wants to merge 4 commits into
masterfrom
feat/next-version
Open

Feat/next version#2036
woile wants to merge 4 commits into
masterfrom
feat/next-version

Conversation

@woile

@woile woile commented Jul 24, 2026

Copy link
Copy Markdown
Member

Description

Just display the next version based on commits:

# before this PR: 4.16.5
$ cz version -p --next
4.17.0
$ cz version -p --next --minor
17
$ cz version -p --next --major
4

This is useful, because it improves the scm provider workflow, which is read-only, based on the tag.
With this features users can easily write themselves:

next_version = $(cz version -p --next --tag)
git tag "$next_version"

TODO: Add tutorial for this

On top of that, it's useful for github/forgejo actions for example (not controlled by commitizen, so you'd still need to format the tag):

next_major = $(cz version -p --next --major)
git tag -f "v$next_major"

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)

AI only assisted with testing

Code Changes

  • Add test cases to all the changes you introduce
  • Run uv run poe all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run uv run poe doc locally to ensure the documentation pages renders correctly
  • Check and fix any broken links (internal or external)

Expected Behavior

Steps to Test This Pull Request

# before this PR: 4.16.5
$ cz version -p --next
4.17.0
$ cz version -p --next --minor
17
$ cz version -p --next --major
4

Additional Context

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Commitizen bump preview

Merging this PR will produce the following bump:

bump: version 4.16.5 → 4.17.0
tag to create: v4.17.0
increment detected: MINOR

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.24%. Comparing base (f087597) to head (946ce9b).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2036   +/-   ##
=======================================
  Coverage   98.23%   98.24%           
=======================================
  Files          61       61           
  Lines        2784     2797   +13     
=======================================
+ Hits         2735     2748   +13     
  Misses         49       49           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@woile
woile force-pushed the feat/next-version branch 2 times, most recently from f75472f to 21ab7d4 Compare July 24, 2026 10:44
@woile
woile enabled auto-merge (rebase) July 24, 2026 10:45
@woile
woile force-pushed the feat/next-version branch from 21ab7d4 to 946ce9b Compare July 24, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant