Skip to content

Commit

Permalink
Add pre-commit hook to disallow modifying migrations (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog authored Jul 5, 2024
2 parents a857a7d + ffe0112 commit 7278103
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 7278103

Please sign in to comment.