Repository navigation
Lotram/customizable allowed prefixes - #678
Merged
Lee-W merged 2 commits intoJun 25, 2023
Merged
Conversation
Lotram
force-pushed
the
Lotram/customizable-allowed-prefixes
branch
2 times, most recently
from
March 2, 2023 15:55
afed161 to
a7ae3d7
Compare
Member
|
Sorry for the long delat, this feature looks dope! Can you rebase please 🙏🏻 ? |
Lotram
force-pushed
the
Lotram/customizable-allowed-prefixes
branch
from
May 2, 2023 12:19
a7ae3d7 to
672ff94
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #678 +/- ##
==========================================
+ Coverage 97.31% 97.32% +0.01%
==========================================
Files 42 42
Lines 2045 2055 +10
==========================================
+ Hits 1990 2000 +10
Misses 55 55
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Contributor
Author
|
@woile Rebased. I removed the commit fixing the pre-commit config, as it has been fixed already |
The allowed prefixes, which bypass the regex check, can now be configured.
Lotram
force-pushed
the
Lotram/customizable-allowed-prefixes
branch
from
June 8, 2023 08:27
e54741d to
c77dcc5
Compare
Contributor
Author
|
@woile rebased and all checks have passed |
Member
|
close #672 |
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
Related to #672
The allowed message prefix list can now be configured.
In particular, it can be set to an empty list, if we do not want to allow commits such as fixups.
I also fixed a typo in
.pre-commit-config.yamland a typing error incommitizen/cli.pyChecklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
The allowed prefix list can be configured, either using a config file, or when using the cli directly.
Steps to Test This Pull Request
poetry shellpython commitizen/cli.py check --message 'fixup!' --allowed-prefixes 'Merge' 'Revert' 'Custom Prefix'. It should return an errorpython commitizen/cli.py check --message "Custom Prefix random text" --allowed-prefixes 'Merge' 'Revert' 'Custom Prefix'. It should passAdditional context