Skip to content

Queue Props Bot runs instead of cancelling them - #303

Open
obenland wants to merge 2 commits into
WordPress:run-action-for-labelfrom
obenland:fix/queue-props-bot-runs
Open

obenland wants to merge 2 commits into
WordPress:run-action-for-labelfrom
obenland:fix/queue-props-bot-runs

Conversation

@obenland

@obenland obenland commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #50.

Builds on #201, which adds .github/workflows/props-bot.yml as a copy of the example that linting keeps in sync. This changes both.

GitHub notifies whoever triggered a workflow run when it gets cancelled. The example cancelled an unfinished run whenever a new one started for the same pull request, so in a busy discussion every comment that came in while Props Bot was still running sent its author a "Run cancelled" notification. #291 already moved concurrency onto the job, so runs that skip it, like a label other than props-bot, no longer cancel anything. Two causes remained:

  • Reviews with inline comments. Submitting a review with five inline comments fired one pull_request_review event and five pull_request_review_comment events at once, so every run but the last was cancelled.
  • Overlapping triggers. Comments and pushes that arrive while a run is still going cancel it.

Recent wordpress-develop runs show both. Of 9 cancelled runs, 4 came from reviews and 5 from review comments.

Changes

  • Queue runs instead of cancelling them. This uses the concurrency queue: max option, since with the default queue: single GitHub would still cancel a pending run once a newer one arrived. Runs for a pull request still go one at a time and in order, so an older run can't overwrite a newer list. Gutenberg made the same switch in Props Bot: Queue runs instead of cancelling superseded ones gutenberg#84176.
  • Drop the pull_request_review_comment trigger. GitHub submits every inline comment and thread reply as part of a review, so pull_request_review already runs for each of them. For example, a thread reply on Format Library: Split "Highlight" into "Text color" and "Highlight color" gutenberg#85296 became its own COMMENTED review and started a pull_request_review run three seconds later. The extra trigger only added one redundant run per comment. Gutenberg dropped it too.

Note: actionlint 1.7.12 doesn't know queue yet and reports it as an unknown key. GitHub accepts it.

Testing

  1. Merge Sync the test workflow with the example. #201 so the Props Bot workflow runs in this repository.
  2. Leave a few comments on a pull request in quick succession. Confirm the runs queue up and complete, and none is cancelled.
  3. Submit a review with several inline comments. Confirm it starts a single run.
  4. Reply to a review thread. Confirm it starts a run.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 23, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@obenland
obenland force-pushed the fix/queue-props-bot-runs branch from e909239 to e6d1f3e Compare October 23, 2026 20:38
obenland and others added 2 commits October 23, 2026 15:38
GitHub notifies whoever triggered a run when it is cancelled, so a busy
discussion on a pull request sent its commenters a notification for each
comment that arrived while Props Bot was still running. Runs for the same
pull request now wait their turn, which still writes the list in order.

Fixes WordPress#50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub submits every inline comment and thread reply as part of a review,
so `pull_request_review` already runs for all of them. Submitting a review
with several inline comments also started one run per comment, all at once,
which then cancelled or queued behind each other for no new information.

See WordPress#50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@obenland
obenland force-pushed the fix/queue-props-bot-runs branch from e6d1f3e to 4907355 Compare October 23, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants