Skip to content

Synchronize Pre-commit Hook Version with Commitizen Version #580

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

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

Kurt-von-Laven
Copy link
Contributor

@Kurt-von-Laven Kurt-von-Laven commented Sep 7, 2022

Description

Fixes #579.

Bump pre-commit hook self test from v2.32.2 to v2.32.3. The version of the Commitizen pre-commit hooks is typically bumped automatically by Commitizen itself, but because the behavior of cz bump was changed in Commitizen v2.32.3, and the bump from v2.32.2 to v2.32.3 was performed by Commitizen v2.32.2, the pre-commit hooks were not bumped.

Remove a redundant join call. The list of lines is now joined unconditionally in _bump_with_regex, so there is never a need to join it in update_version_in_files. The removed join was hence a no-op because it was performed on a str.

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

Expected behavior

cz bump automatically increments the version of the Commitizen pre-commit hooks.

Steps to Test This Pull Request

  1. Run cz bump locally.
  2. Confirm that the pre-commit hooks are automatically bumped from v2.32.3 to v2.32.4.

Additional context

I should have split #568 into two separate pull requests; my apologies. As mentioned in #565, I am encountering some difficulties testing Commitizen locally.

The version of the Commitizen pre-commit hooks is typically bumped
automatically by Commitizen itself, but because the behavior of cz bump
was changed in Commitizen v2.32.3, and the bump from v2.32.2 to v2.32.3
was performed by Commitizen v2.32.2, the pre-commit hooks were not
bumped.
The list of lines is now joined unconditionally in _bump_with_regex, so
there is never a need to join it in update_version_in_files. The removed
join was hence a no-op because it was performed on a str.
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Base: 98.43% // Head: 98.43% // No change to project coverage 👍

Coverage data is based on head (f9fd201) compared to base (7f7a606).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #580   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files          39       39           
  Lines        1596     1596           
=======================================
  Hits         1571     1571           
  Misses         25       25           
Flag Coverage Δ
unittests 98.43% <100.00%> (ø)

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

Impacted Files Coverage Δ
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/bump.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Kurt-von-Laven
Copy link
Contributor Author

@Lee-W @woile, please note that the first commit in this pull request should only be merged as-is if it is merged prior to any other pull requests that bump the Commitizen version. Otherwise, it will need to be updated to reflect the new Commitizen version.

@woile woile merged commit e44352b into commitizen-tools:master Sep 8, 2022
@Kurt-von-Laven Kurt-von-Laven deleted the bump branch September 8, 2022 06:04
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.

Pre-commit Hook Self Test Version Desynchronized From Commitizen Version
2 participants