Skip to content

Ping the user who enqueued a PR when it's removed from the merge queue - #4265

Open
henrymercer wants to merge 1 commit into
mainfrom
henrymercer/notify-enqueuer-on-dequeue
Open

henrymercer wants to merge 1 commit into
mainfrom
henrymercer/notify-enqueuer-on-dequeue

Conversation

@henrymercer

Copy link
Copy Markdown
Contributor

Follow-up to #4263. When a PR is removed from the merge queue, the comment now mentions the user who most recently added it to the queue rather than the PR author. This avoids pinging bots on PRs authored by Dependabot or Actions, which maintainers enqueue.

The dequeued event payload doesn't identify the enqueuer, so the workflow looks them up in the most recent AddedToMergeQueueEvent on the PR's timeline. If auto-merge added the PR to the queue, this event is attributed to the user who enabled auto-merge.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings October 23, 2026 12:35
@github-actions github-actions Bot added the size/XS Should be very easy to review label Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A failed recipient lookup stops the workflow before it posts the dequeue notification.

1 open issue
What changed in this PR

Updates the repository’s merge-queue notification workflow to notify the person who enqueued a PR rather than its author, avoiding mentions of bot authors.

Changes:

  • Queries the PR timeline for the latest merge-queue enqueuer.
  • Uses that user’s login in the dequeue notification.
File Description
.github/​workflows/​pr-dequeued.yml Looks up and mentions the latest enqueuer in dequeue comments.

Review effort: Max

Comment on lines +40 to +41
--jq '.data.repository.pullRequest.timelineItems.nodes[0].enqueuer.login')
echo "@$enqueuer The pull request was removed from the merge queue (\`$REASON\`)." \
@henrymercer
henrymercer marked this pull request as ready for review October 23, 2026 12:45
@henrymercer
henrymercer requested a review from a team as a code owner October 23, 2026 12:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants