File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ default_language_version :
2+ python : python3
3+ repos :
4+ - repo : https://github.com/pre-commit/pre-commit-hooks
5+ rev : v4.4.0
6+ hooks :
7+ - id : check-yaml
8+ - id : end-of-file-fixer
9+ - id : trailing-whitespace
10+ - repo : https://github.com/ambv/black
11+ rev : 23.3.0
12+ hooks :
13+ - id : black
14+ - repo : https://github.com/pycqa/flake8
15+ rev : 6.0.0
16+ hooks :
17+ - id : flake8
18+ - repo : https://github.com/pycqa/isort
19+ rev : 5.12.0
20+ hooks :
21+ - id : isort
22+ args : ["--profile", "black"]
23+ - repo : https://github.com/kynan/nbstripout
24+ rev : 0.6.1
25+ hooks :
26+ - id : nbstripout
27+ - repo : local
28+ hooks :
29+ - id : prevent-commit-to-main
30+ name : Prevent Commit to Main Branch
31+ entry : ./prevent_commit_to_main.sh
32+ language : script
33+ stages : [commit]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # #!"C:\\Program Files\\Git\\usr\\bin\\bash.exe"
3+
4+ branch=" $( git rev-parse --abbrev-ref HEAD) "
5+
6+ if [ " $branch " = " main" ]; then
7+ echo " You are on the main branch. Committing to the main branch is not allowed."
8+ exit 1
9+ fi
You can’t perform that action at this time.
0 commit comments