-
Notifications
You must be signed in to change notification settings - Fork 439
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
Move pre-commit GitHub action to pre-commit.ci #4263
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4263 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 97 97
Lines 20755 20755
=======================================
Hits 19879 19879
Misses 876 876 |
The action website states:
I think we decided to not go with that because we didn't want to have it modify the files independently. I'm actually fine if we decide to have the CI action modify our source. I've seen this implemented in other repos and have yet to see issues arise. |
I'd like to push back against that. If implemented, it needs to be fully opt-in. |
I'm more concerned about this part
This means that any change that requires significant rework will probably be the end of it.
I am fairly certain that you can turn off this behavior in pre-commit.ci. It has configuration options autofix_prs which would turn off auto-updates to PRs. Auto-updates to main branch opens a PR, it doesn't directly make changes, nor should it be possible since that branch is protected. See pull requests from https://github.com/python-telegram-bot/python-telegram-bot/pulls here which do not have any autoupdate changes in PRs, but have the pre-commit.ci checks run. |
Thanks for the hint @MatthewFlamm! Since I've disabled
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume an administrator to this repo will have to install the app after merging.
Oh wait it is working already 🥳 I assume we can get rid of this workflow too? https://github.com/pyvista/pyvista/blob/main/.github/workflows/pre-commit-update.yml Or should we wait until it sends a PR first? |
@akaszynski Thanks for finding the configuration! I had been using pre-commit-bot as the default for my repositories, but I didn't realize it could be configured in such detail. |
@MatthewFlamm Good catch. Thanks! |
pre-commit
integration
pre-commit
integration
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Yea, I'm going to use this a lot. |
OK! All my wishes have been granted and I thank the PyVista community for help. And welcome to our community pre-commit-ci[bot] ! |
Okay this is quite nice... thanks for making it opt-in with the comment, that's super useful |
Overview
Using pre-commit official GitHub action.Move pre-commit GitHub action to pre-commit.ci.
Details