From a413c0b43c970002bf3c813b897e2c34d82da033 Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Thu, 13 Aug 2026 12:20:00 +0000 Subject: [PATCH] ci: Notify PR authors on merge queue removal (no-changelog) (#36207) Co-authored-by: Claude Fable 5 --- .../util-notify-merge-queue-removal.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/util-notify-merge-queue-removal.yml diff --git a/.github/workflows/util-notify-merge-queue-removal.yml b/.github/workflows/util-notify-merge-queue-removal.yml new file mode 100644 index 00000000000..798c93f50f1 --- /dev/null +++ b/.github/workflows/util-notify-merge-queue-removal.yml @@ -0,0 +1,22 @@ +name: 'Util: Notify Merge Queue Removal' + +on: + pull_request: + types: [dequeued] + +permissions: + pull-requests: write + +jobs: + notify: + runs-on: ubuntu-latest + # MERGE/ALREADY_MERGED are successful exits, MANUAL is the author's own doing + if: ${{ !contains(fromJSON('["MERGE", "ALREADY_MERGED", "MANUAL"]'), github.event.reason) }} + steps: + # A failing PR can dequeue others behind it, so the reason may not be this PR's fault + - run: | + gh pr comment "$PR_URL" --body "This PR was removed from the merge queue (reason: \`$REASON\`). Check the merge-queue run's failing checks and re-queue when ready." + env: + GH_TOKEN: ${{ github.token }} + PR_URL: ${{ github.event.pull_request.html_url }} + REASON: ${{ github.event.reason }}