Randomly fail a pre-commit run
Add this to your .pre-commit-config.yaml
repos:
- repo: https://github.com/sco1/pre-commit-fail-randomly
rev: v0.1.0
hooks:
- id: fail-randomly
args: [--fail-chance=0.05]
Randomly fail your pre-commit pipeline. fail-chance
may be optionally specified to change your failure chance (default: 0.05
). Ideally this is a float between 0
and 1
, inclusive, but you can do what you'd like and live with the consequences. If you specify a negative value then the universe has decided you get a 50/50 shot at failure.