Add pre-commit hook to prevent direct commits to the main branch
This commit is contained in:
parent
bc379e9fc2
commit
45c0e95e85
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,12 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
|
- id: no-commit-to-main
|
||||||
|
name: Don't commit to main branch
|
||||||
|
entry: sh -c 'if [ "$(git rev-parse --abbrev-ref HEAD)" = "main" ]; then echo "Direct commits to main branch are not allowed!"; exit 1; fi'
|
||||||
|
language: system
|
||||||
|
pass_filenames: false
|
||||||
|
always_run: true
|
||||||
- id: test-ui
|
- id: test-ui
|
||||||
name: Test Frontend
|
name: Test Frontend
|
||||||
entry: just test-frontend
|
entry: just test-frontend
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue