mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Add wildcard matching to no-commit-to-branch hook so that commits can
be blocked on, for example, all release branches with 'release/*'
This commit is contained in:
parent
aa9c202b9b
commit
d6847c4827
3 changed files with 19 additions and 4 deletions
|
|
@ -79,7 +79,7 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
|
||||
- Use `args: ['--django']` to match `test*.py` instead.
|
||||
- `no-commit-to-branch` - Protect specific branches from direct checkins.
|
||||
- Use `args: [--branch, staging, --branch, master]` to set the branch.
|
||||
- Use `args: [--branch, staging, --branch, master, --branch, release/*]` to set the branch.
|
||||
`master` is the default if no argument is set.
|
||||
- `-b` / `--branch` may be specified multiple times to protect multiple
|
||||
branches.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue