Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-commit.ci to automatically update pre-commit hook versions #665

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Apr 27, 2024

Motivation
pre-commit hooks are running (very) old versions, and need to be updated.

To update pre-commit hook versions, we can manually run this command

poetry run pre-commit autoupdate

Alternatively, we can use pre-commit.ci to automate the update. This will automatically create PRs to update the hook versions. For example, see fastapi/fastapi#9259

Pre-comit.ci is free for open source repositories

Source
https://chrisholdgraf.com/blog/2022/precommit-autoupdate/
https://pre-commit.ci/

Reference
https://github.com/tiangolo/fastapi/blob/1d41a7d2df5714e6598b541cac3cac5859b3ad4b/.pre-commit-config.yaml#L23

@kevinjqliu kevinjqliu marked this pull request as ready for review April 27, 2024 21:06
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice @kevinjqliu!

I was looking for this a long time, let's give it a try! 🚀

@Fokko Fokko merged commit 1b8a4c3 into apache:main Apr 29, 2024
7 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/pre-commit branch April 29, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants