From ffe0112f677a7c81b1096577078489037a518200 Mon Sep 17 00:00:00 2001 From: Anne Schuth Date: Thu, 4 Jul 2024 19:46:47 +0200 Subject: [PATCH] Add hook to disallow migrations --- .pre-commit-config.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fe0bb16..533af4c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,6 @@ repos: - id: trailing-whitespace - id: check-yaml - id: check-json - - id: check-added-large-files - id: check-merge-conflict - id: check-toml @@ -19,7 +18,14 @@ repos: hooks: - id: ruff - id: ruff-format - + - repo: local + hooks: + - id: check-modified-migrations + name: check-modified-migrations + entry: sh -c '! git diff --cached --name-only --diff-filter=MD | grep ^tad/migrations/versions' + language: system + pass_filenames: false + always_run: true ci: autofix_prs: false autofix_commit_msg: "Auto fix pre-commit.com hooks"