Skip to content

Commit

Permalink
try to alert (via webhook) when Mergify is stuck
Browse files Browse the repository at this point in the history
Add a label "waiting too long" if a PR has "merge delay passed"
but is still open without any activity. Somewhat hacky, since
GitHub's API doesn't provide any real hooks for it so I'm guessing
at ways to try to catch it. Can only be tested by merging, since
Mergify won't apply it unless it's on `master`.
  • Loading branch information
geekosaur authored and Mikolaj committed Dec 18, 2024
1 parent 3727226 commit 04f784d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,31 @@ pull_request_rules:
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'

# label when Mergify didn't trigger a merge automatically
- actions:
label:
add:
- waiting too long
name: Mergify hasn't merged a PR yet
conditions:
- base=master
- -draft
- -closed
- -merged
- '#approved-reviews-by>=2'
- '#changes-requested-reviews-by=0'
- updated-at<4 days ago
- label=merge delay passed
# oy
# lifted these from branch protection imports
- check-success=fourmolu
- check-success=hlint
- check-success=Meta checks
- check-success=Doctest Cabal
- check-success=Validate post job
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'

# rebase+merge strategy
- actions:
queue:
Expand Down

0 comments on commit 04f784d

Please sign in to comment.