From 7474a3a8306d20e1d1137a160506abdce39ea500 Mon Sep 17 00:00:00 2001 From: Michalis Papadimitriou Date: Tue, 31 Aug 2021 11:36:55 +0300 Subject: [PATCH] [CI] make pre-commit hooks to run on every push instead of every commit --- .pre-commit-config.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a2c07de458a..982b78180f2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ # Requirements: # - How to configure: # - $ pip install pre-commit -# - $ pre-commit install +# - $ pre-commit install --hook-type pre-push # - How to prevent running it: # - git options: --no-verify or -n # - $ git commit -n -m "YOUR COMMIT MESSAGE" @@ -32,8 +32,9 @@ # default_language_version: - python: python3.8 + python: python3.6 fail_fast: True +default_stages: [push] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 @@ -42,7 +43,9 @@ repos: - id: check-merge-conflict - id: check-yaml - id: end-of-file-fixer + stages: [push] - id: trailing-whitespace + stages: [push] - repo: local hooks: - id: run-black