Skip to content

Commit c2a4d55

Browse files
committed
Add workflow to comment on a PR when it was dequeued
1 parent bdadc03 commit c2a4d55

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎.github/workflows/pr-dequeued.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR dequeued
2+
3+
on:
4+
pull_request:
5+
types:
6+
- dequeued
7+
8+
jobs:
9+
notify:
10+
name: Notify
11+
runs-on: ubuntu-slim
12+
13+
permissions:
14+
pull-requests: write
15+
16+
steps:
17+
- name: Notify that the PR was removed from the merge queue
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
PR_NUMBER: ${{ github.event.pull_request.number }}
21+
REASON: ${{ github.event.reason }}
22+
SENDER: ${{ github.event.sender }}
23+
run: |
24+
echo "@$SENDER The pull request was removed from the merge queue (`$REASON`)." \
25+
"Please resolve any issues if required and enqueue the PR again." |
26+
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"

0 commit comments

Comments
 (0)