Skip to content

Commit 0408904

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

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
if: github.event.pull_request.merged != true
14+
15+
permissions:
16+
pull-requests: write
17+
18+
steps:
19+
- name: Notify that the PR was removed from the merge queue
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
PR_NUMBER: ${{ github.event.pull_request.number }}
23+
REASON: ${{ github.event.reason }}
24+
SENDER: ${{ github.event.sender.login }}
25+
run: |
26+
echo "@$SENDER The pull request was removed from the merge queue (\`$REASON\`)." \
27+
"Please resolve any issues if required and enqueue the PR again." |
28+
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"

0 commit comments

Comments
 (0)