-
-
Notifications
You must be signed in to change notification settings - Fork 281
Lotram/customizable allowed prefixes #678
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
Lotram/customizable allowed prefixes #678
Conversation
afed161
to
a7ae3d7
Compare
Sorry for the long delat, this feature looks dope! Can you rebase please 🙏🏻 ? |
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. |
@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.
e54741d
to
c77dcc5
Compare
@woile rebased and all checks have passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close #672 |
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.yaml
and a typing error incommitizen/cli.py
Checklist
./scripts/format
and./scripts/test
locally 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 shell
python 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