Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

fix(init): fix is_pre_commit_installed method #744

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 1 commit into from
May 11, 2023

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented May 11, 2023

the logic of the original method is "pre_commit_not_installed"

Description

Closes #743

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

Run cz init and choose to install pre-commit hook without encountering error

Steps to Test This Pull Request

  1. Run cz init
  2. Choose to install pre-commit hook

Additional context

the logic of the original method is "pre_commit_not_installed"
@Lee-W Lee-W requested a review from woile May 11, 2023 12:27
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: +0.04 🎉

Comparison is base (3cfed6d) 97.26% compared to head (eb39f8b) 97.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #744      +/-   ##
==========================================
+ Coverage   97.26%   97.31%   +0.04%     
==========================================
  Files          42       42              
  Lines        2045     2045              
==========================================
+ Hits         1989     1990       +1     
+ Misses         56       55       -1     
Flag Coverage Δ
unittests 97.31% <66.66%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
commitizen/commands/init.py 87.43% <50.00%> (ø)
commitizen/__version__.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

@woile woile merged commit 9d2192f into master May 11, 2023
@woile woile deleted the fix-pre-commit-installed-check branch May 11, 2023 12:34
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.

"cz init" cannot set pre-commit hook correctly
2 participants