File tree Expand file tree Collapse file tree
{{cookiecutter.project_slug}} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,19 @@ repos:
4949 - id : djlint-reformat-django
5050 - id : djlint-django
5151
52+ - repo : local
53+ hooks :
54+ - id : check-migrations
55+ name : check-migrations
56+ {%- if cookiecutter.use_docker == 'y' %}
57+ entry : /usr/bin/env bash -c "bash .envs/.local/.django && bash .envs/.local/.postgres && docker compose -f local.yml run --rm django bash -c 'python manage.py makemigrations --check --dry-run'"
58+ {%- else %}
59+ entry : /usr/bin/env bash -c "bash .envs/.local/.django && bash .envs/.local/.postgres && python manage.py makemigrations --check --dry-run"
60+ {%- endif %}
61+ types : [ python ]
62+ pass_filenames : false
63+ language : system
64+
5265# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
5366ci :
5467 autoupdate_schedule : weekly
You can’t perform that action at this time.
0 commit comments