Search code examples
pre-commit.com

How do I make sure that “pre-commit autoupdate” gets run periodically?


I know that I should check for pre-commit hook updates from time to time, but I rarely think about running pre-commit autoupdate. I end up using out-of-date pre-commit hooks for months.

pre-commit.ci will automatically run pre-commit autoupdate and submit pull requests if updates are found, but it only supports repos hosted on GitHub, and a lot of my repos aren’t hosted on GitHub.

How can I make sure that my pre-commit hooks stay up to date?


Solution

  • Check out pre-commit-update, it can be configured as a pre-commit hook itself so you will never have to worry about manually updating the hooks :)

    Also, it is very configurable.