-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
It would be nice to skip the pre-commit for a PR, perhaps using a PR label
It would be nice to skip the pre-commit for a commit message, perhaps using skip ci or similar
There is no way to use a native way in pre-commit to skip hooks on a specific commit message such as using skip ci. See pre-commit/pre-commit#2806.
Expected Behavior
An easy way to skip pre-commit per commit or per PR.
Usually this comes up if there is a special edge case where you need something done without one of pre-commit's hooks getting in the way, without disabling the entire hook all together.
Use Case
We have some old code where a hook is updating the code and is doing it with the new way instead of the old way. We can work on upgrading the code or fixing the hook. We'd prefer punting for now to get the changes out and creating a ticket in the next sprint to fix the underlying issue.
Describe Ideal Solution
- uses: cloudposse/github-action-pre-commit@v2.1.2
with:
skip-pr-label: 'skip-precommit' # Hypothetically this is the default valueAlternatives Considered
One alternative is to bake an if condition before the action is called
- uses: cloudposse/github-action-pre-commit@v2.1.2
if: contains(github.event.pull_request.labels.*.name, 'skip-precommit')Additional Context
N/A