Repository navigation
Self Check With New commitizen-branch pre-commit Hook - #565
Merged
Merged
Conversation
Codecov ReportBase: 98.43% // Head: 98.37% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
==========================================
- Coverage 98.43% 98.37% -0.07%
==========================================
Files 39 39
Lines 1602 1602
==========================================
- Hits 1577 1576 -1
- Misses 25 26 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
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. |
4 tasks done
They already run pre-push, and this behavior is left unchanged. Running hooks pre-commit gives developers more immediate feedback and improves commit quality by blocking an often unnecessary series of fix commits.
Use new commitizen-branch hook to verify correctness of existing commit messages post-commit and pre-push. This guards against cherry-picked commits with invalid commit messages as well as empty commit messages (e.g., created with git commit --allow-empty-message).
Kurt-von-Laven
force-pushed
the
pre-commit
branch
from
August 22, 2022 07:25
7ce29d3 to
f65da26
Compare
Contributor
Author
|
The Codecov issue strikes me as test flakiness. |
2 of 4 tasks
Lee-W
approved these changes
Aug 22, 2022
Lee-W
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks @Kurt-von-Laven Let's merge it
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Check existing commit messages. Use new
commitizen-branchhook to verify correctness of existing commit messages post-commit and pre-push. This guards against cherry-picked commits with invalid commit messages as well as empty commit messages (e.g., created withgit commit --allow-empty-message).Run hooks pre-commit by default. They already run pre-push, and this behavior is left unchanged. Running hooks pre-commit gives developers more immediate feedback and improves commit quality by blocking an often unnecessary series of fix commits.
When testing this change locally,
poetry installfailed with the following error:I think
poetry updatemay need to be run, but when I tried that, I encountered 51 test failures.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
The new
commitizen-branchhook passes.Steps to Test This Pull Request
poetry updateto work around issue described above.poetry installto install pre-commit and other dependencies.commitizen-branchhook fails when the rangeorigin/HEAD..HEADcontains no commits.poetry run pre-commit run --all-files --hook-stage pushto run all pre-push hooks.Additional context
Follows on #517.