cookiecutter-hypermodern-python
cookiecutter-hypermodern-python copied to clipboard
Add GA action to update pre-commit configuration
Here is an example using a cron-style approach from cookiecutter-django:
https://github.com/pydanny/cookiecutter-django/blob/master/.github/workflows/pre-commit-autoupdate.yml
This is useful both for generated projects and for the Cookiecutter itself, as both use the Prettier, a non-Python hook which is not updated by Dependabot.
See also https://browniebroke.com/blog/gh-action-pre-commit-autoupdate/
maybe https://pre-commit.ci/
@eyllanesc I'm wondering if it's possible to use pre-commit.ci for updates only, without actually running hooks. Most of our hooks are system hooks, so pre-commit.ci can't run them. In fact, would it even accept a pre-commit config containing a system hook?
@cjolowicz One workaround is to use skip option so that it doesn't execute local hooks.
ci:
skip:
- black
- check-added-large-files
- check-toml
- check-yaml
- end-of-file-fixer
- flake8
- isort
- pyupgrade
- trailing-whitespace
repos:
- repo: local
hooks:
- id: black
# ...