-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
no-commit-to-branch on CI #265
Comments
Thanks for the report! Looks like this hook false-positives when not on a branch (as is likely in CI). I'll add a quick check for that :) |
This has been released as part of v1.2.1! |
Hi @asottile I try to understand how no-commit-to-branch should work duing CI on BitBucket. I have 2 pipelines. Test and deploy. I struggle when have https://github.com/pre-commit/pre-commit-hooks#no-commit-to-branch says only about branches but --no-ff merges are commits and pipelines think they are. Do You have any thoughts about how this workflow with specific hook should be done? Thanks in advance for any response. |
@JulianVolodia your question is unrelated to this issue -- in the future I'd encourage you to create a new issue for unrelated things if it doesn't apply in some scenario you can always utilize (locking because off-topic) |
As a safety net, we've started running pre-commit on CI, e.g.
one of our projects uses
no-commit-to-branch
and we just noticed this behavior on CI:most likely this is not really an issue with
pre-commit
but with the way our Jenkins jobs are set up (?). I worked around this by usingSKIP=no-commit-to-branch pre-commit run
but just thought I would let you know.The text was updated successfully, but these errors were encountered: