Keep PR dashboard webhook updates scoped to one pull request#139
Conversation
There was a problem hiding this comment.
Pull request overview
Separates targeted webhook delivery from repository-wide status-comment rollouts while retaining bulk backfill behavior.
Changes:
- Adds targeted PR delivery through the workflow and delivery CLI.
- Limits targeted status-comment and Slack processing to the triggering PR.
- Adds regression tests for targeted delivery and state preservation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pull-request-dashboard-repo.yml |
Passes the target PR to delivery. |
.github/scripts/pull-request-dashboard/delivery.py |
Adds targeted delivery routing. |
.github/scripts/pull-request-dashboard/pr_status_comment.py |
Drains only the targeted comment update. |
.github/scripts/pull-request-dashboard/notify_slack.py |
Merges targeted notification state. |
.github/scripts/pull-request-dashboard/test_delivery.py |
Tests targeted orchestration. |
.github/scripts/pull-request-dashboard/test_pr_status_comment.py |
Tests targeted rollout behavior. |
.github/scripts/pull-request-dashboard/test_notify_slack.py |
Tests preservation of unrelated history. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull request dashboard statusStatus last refreshed: 2026-07-26 02:13:34 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/scripts/pull-request-dashboard/notify_slack.py:73
- When notification state is uninitialized,
last_notification_stateisNone, so the branch that definestarget_pr_keysis skipped. The targeted merge below then raisesUnboundLocalErrorinstead of preserving the bootstrap behavior; the new uninitialized-state test will fail. Define the key set for every targeted call and only guard the filtering on the state being non-None.
if target_pr_numbers is not None:
…targeted delivery invariants
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/scripts/pull-request-dashboard/notify_slack.py:67
- When notification state is uninitialized,
last_notification_stateisNone, so this branch never assignstarget_pr_keys; the targeted merge below then raisesUnboundLocalErrorinstead of preserving the bootstrap sentinel. Define the target keys whenever targeted delivery is requested, and only guard the filtering on the state being non-None. This also makes the newly added bootstrap regression test pass.
if target_pr_numbers is not None and last_notification_state is not None:
target_pr_keys = {str(number) for number in target_pr_numbers}
last_notification_state = {
str(number): notification
for number, notification in last_notification_state.items()
if str(number) in target_pr_keys
}
Keep webhook-triggered dashboard updates focused on the pull request that changed instead of allowing each event to start or continue repository-wide status-comment delivery. This avoids multiplying long-running jobs and overwhelming GitHub Actions when many pull requests change at once or a dashboard comment format change must be applied to every open pull request. The hourly dashboard run remains the bounded path for repository-wide rollout and recovery.