-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Refinement to pre-commit in CI #9795
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
Comments
Do we have to create a special branch? Can we just use the pre-commit run --from-ref <<pipeline.git.base_revision>> --to-ref HEAD |
@humitos yes, agreed. When I wrote this, I thought there was a reason to run this from Tox. But there isn't. We can just install pre-commit alongside Tox and run it straight in the Circle CI env. One layer less 👍 |
I was saying to keep it running on It's on tox because all the other checks are performed by tox and also because it's useful to run it locally. |
Edit: Adding a branch or tagging the revision can probably work fine. |
We should add here that it's not enough to ensure that we are comparing just the correct base branch, we should also compare to the correct upstream repo. Otherwise an outdated |
We have hardcoded the
main
branch in our pre-commit CI check:readthedocs.org/tox.ini
Lines 76 to 78 in c8f9b85
A way to get around this is to create a specially named branch
pre-commit-base
in the following step:https://github.com/readthedocs/readthedocs.org/pull/9793/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R45
I'm thinking that a replacement using Circle CI parameters would work:
pipeline.git.base_revision
The text was updated successfully, but these errors were encountered: