英文:
How do I make sure that “pre-commit autoupdate” gets run periodically?
问题
我知道我应该定期检查 pre-commit 钩子的更新,但我很少考虑运行 pre-commit autoupdate
。我最终使用过时的 pre-commit 钩子数个月。
pre-commit.ci 会自动运行 pre-commit autoupdate
,如果找到更新,会提交拉取请求,但它仅支持托管在 GitHub 上的仓库,而我的很多仓库并不托管在 GitHub 上。
如何确保我的 pre-commit 钩子保持更新?
英文:
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?
答案1
得分: 1
你可以使用 crontab
定期自动更新它。您可以参考这个问题中的类似解决方案。
英文:
You can use a crontab
to automatically update it for you on a regular basis. You can take a look at a similar solution in this question.
答案2
得分: 1
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.
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论