Closed adamchainz closed 2 years ago
I know, that's why the documentation continues with:
Finally, run the following command: $ pre-commit autoupdate
That command will replace main
with the latest tag on GitHub. Together, these instructions have the same result as doing it manually, namely that .pre-commit-config.yaml
contains an explicit tag name as recommended by pre-commit.
Or am I missing something?
I missed reading that. I guess I skimmed it and expected to see the same as all the pre-commit official repos e.g. https://github.com/pre-commit/mirrors-mypy#mypy-mirror
I also didn't know autoupdate
would pull the latest tag - TIL.
Up to you if you adjust to the other format. Maybe a comment in the YAML like main # run autoupdate to pin to a version
would do.
👍👍
pre-commit heavily discourages using a branch name for
rev
as that prevents repeatable environments, and autoupdates don't work.