You should just use a protected branch instead.
Kenobi detects forced pushes on GitHub repos and alerts you about them.
By default, all branches will be checked. If you only care about particular branches, set a comma separated list of them in the BRANCHES environment variable.
Several different notifiers can be used to alert you that a force push has been detected. Configure them by setting the required environment variables.
Post the details of the force push to Slack.
| Name | Purpose | Required? |
|---|---|---|
SLACK_WEBHOOK_URL |
The Slack webhook URL to use. | Required |
Trigger an incident in PagerDuty when a force push occurs.
| Name | Purpose | Required? |
|---|---|---|
PAGERDUTY_SERVICE_KEY |
The PagerDuty service API key to use. | Required |