mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Add workflow to comment on a PR when it was dequeued
This commit is contained in:
28
.github/workflows/pr-dequeued.yml
vendored
Normal file
28
.github/workflows/pr-dequeued.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: PR dequeued
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- dequeued
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
name: Notify
|
||||
runs-on: ubuntu-slim
|
||||
|
||||
if: github.event.pull_request.merged != true
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Notify that the PR was removed from the merge queue
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
REASON: ${{ github.event.reason }}
|
||||
SENDER: ${{ github.event.sender.login }}
|
||||
run: |
|
||||
echo "@$SENDER The pull request was removed from the merge queue (\`$REASON\`)." \
|
||||
"Please resolve any issues if required and enqueue the PR again." |
|
||||
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
|
||||
Reference in New Issue
Block a user