Skip to content

Commit 2f1c845

Browse files
authored
[CI] make pre-commit hooks to run on every push instead of every commit (apache#8888)
1 parent b01ab9e commit 2f1c845

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.pre-commit-config.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Requirements:
2424
# - How to configure:
2525
# - $ pip install pre-commit
26-
# - $ pre-commit install
26+
# - $ pre-commit install --hook-type pre-push
2727
# - How to prevent running it:
2828
# - git options: --no-verify or -n
2929
# - $ git commit -n -m "YOUR COMMIT MESSAGE"
@@ -32,8 +32,9 @@
3232
#
3333

3434
default_language_version:
35-
python: python3.8
35+
python: python3.6
3636
fail_fast: True
37+
default_stages: [push]
3738
repos:
3839
- repo: https://github.com/pre-commit/pre-commit-hooks
3940
rev: v2.3.0
@@ -42,7 +43,9 @@ repos:
4243
- id: check-merge-conflict
4344
- id: check-yaml
4445
- id: end-of-file-fixer
46+
stages: [push]
4547
- id: trailing-whitespace
48+
stages: [push]
4649
- repo: local
4750
hooks:
4851
- id: run-black

0 commit comments

Comments
 (0)