Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bump): pre and post bump hooks were failing when an increment was provided (fix #1004) #1007

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

noirbizarre
Copy link
Member

@noirbizarre noirbizarre commented Mar 7, 2024

Description

Since c245b14, cz bump with pre or post hook and a --increment provided were failing it no tag were existing (cf. #1004).

This PR add a test reproducing the issue and fix it.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes (N/A)

Expected behavior

Run cz bump --yes --increment PATCH|MINOR|MAJOR on a repository with either a pre or post hook and without existing version tag, it should not fail.

Steps to Test This Pull Request

Run cz bump --yes --increment PATCH|MINOR|MAJOR on a repository with either a pre or post hook and without existing version tag, with commitizen>=3.16. It should fail without this patch and succeed with (cf. test case)

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.45%. Comparing base (120d514) to head (b6f6858).
Report is 194 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1007      +/-   ##
==========================================
+ Coverage   97.33%   97.45%   +0.11%     
==========================================
  Files          42       55      +13     
  Lines        2104     2399     +295     
==========================================
+ Hits         2048     2338     +290     
- Misses         56       61       +5     
Flag Coverage Δ
unittests 97.45% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@woile woile merged commit dd5dfed into commitizen-tools:master Mar 7, 2024
18 checks passed
@noirbizarre noirbizarre deleted the fix/1004 branch March 7, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants