-
Notifications
You must be signed in to change notification settings - Fork 56
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
GitHub Action to run pre-commit on all pull requests #311
Conversation
This makes most sense if we move all checks from the workflow to pre-commit, and just run pre-commit from the workflow, right? I'm a bit torn on this, since I also like GitHub Actions showing each different check as a separate item in the UI. Is there any way to make that still happen when doing the checks within pre-commit? |
You understand well -- I too am torn about how to implement this but I tend to put the fastest checks in pre-commit and the slower checks in a separate GitHub Action. https://pre-commit.ci is supercool because it allows for automatic corrections to be committed back to the PR but that is a whole other CI tool to consider. |
Using that option, we could still run each check as their own step in the GitHub Workflow, while in developers' environments That would of course require remembering to add new checks also to the workflow after adding them to the pre-commit configuration. |
This ensures that if a contributor fails to install pre-commit, CI will highlight any issues in their submissions.
I find the pre-commit output to be quite readable and have never had any contributor complaints about not understanding that output. |
For the 1.5.0 version, we'll keep running checks directly from GitHub workflows. Let's consider |
I've been experimenting with some GitHub actions which annotate the To combine that with a good pre-commit setup for local use, it seems to me that at least some configuration needs to be duplicated, which is a bit of a bummer. |
This ensures that if a contributor fails to install pre-commit locally, CI will still highlight any issues in their submissions.