Repository navigation
Automated Testing: Request reviews using review routing automation - #86677
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.64 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in
|
For demonstration with changes in pull request
For demonstration
Repository policies have configured review-routing.yml to restrict events it can run. This is so it can run pull_request_target, but it is not configured to run pull_request, so it fails to start up. We can work around this temporarily by creating a second, temporary workflow that uses the pull_request event, with the workflow contents otherwise identical.
Let's keep this additive for now
Cannot assign teams for now, do individual opt-in for now until we can be sure it's working
8214d29 to
724f663
Compare
|
Testing this showed a problem: The default In the meantime, the token can request individuals. And so I'd like to pivot to a more conservative approach: Keep CODEOWNERS as-is for now, and then individuals can opt-in to the review routing approach. |
There was a problem hiding this comment.
The contents of this file are identical to review-routing.yml, except using the pull_request event instead of pull_request_target. pull_request runs using the code of this branch, which is necessary to demonstrate the changes. Because review-routing.yml is now part of a repository policy that allows it to use the pull_request_target event workflow but does not allow it to use the pull_request event, trying to add pull_request to the existing workflow will cause it to fail to start (example, cc @johnbillion ).
Question for those in @WordPress/gutenberg-components : Would anyone like to pilot this along with me? 🙂 In the short-term it may mean more notifications for pull requests that are relevant within our domain but not covered by CODEOWNERS (e.g. #86451 scores). But I plan to move quite quickly to substituting for CODEOWNERS, which should reduce some other notifications. It would also help with testing this pull request, since the workflow successfully requested reviewers with the demonstration changes, but I can't be requested as a reviewer of my own pull request. Feel free to reply or leave a 👍 reaction if you'd like to be added. |
|
The review routing appears to be working:
See score summary: https://github.com/WordPress/gutenberg/actions/runs/43223043500?pr=86677
Now I'll back out the temporary changes. |
ciampo
left a comment
There was a problem hiding this comment.
LGTM 🚀
Let's try this out
|
Some findings after running this for a few days (largely over the weekend). Overall, this seems to be working pretty well. Routing matches where CODEOWNERS wouldn't:
There was one false positive: #84428. In this case, the feature for copying blocks may have been confused with the design system's "Copy to Clipboard" pattern. We might need to be more specific about these patterns applying to UI components. There's maybe also a risk of conflation of the word "pattern" with the block patterns feature. CODEOWNERS matches that routing did not match: Some of these could be borderline, since some like #86887 can have real impact on UI component behavior. Both CODEOWNERS and routing agree:
#86886 is a dependency update, but it also includes some logic changes around focus handling, which would explain why it was flagged where other dependency updates were not. Action items:
|
|
Considering it's an early iteration, it's working really well! |
|
One thing I'm noticing is that the design-system-migration rule matches pretty frequently on pull requests that we may not necessarily need to be involved with (e.g. #77670). Part of this is expected, since the rule can broadly be interpreted as "does the pull request use components" and most every pull request will be. We may be able to scale this back over time once we've gained a clearer picture of how new components fare, particularly in contrast with their equivalents in Edit: #86952 being another example of "start to use a component of the design system" hitting any usage of components. |
…ordPress#86677) * Automated Testing: Add requested review to review routing * TEMPORARY: Add pull_request event to review routing workflow For demonstration with changes in pull request * TEMPORARY: Lower threshold to guarantee requested review For demonstration * TEMPORARY: Add duplicate workflow for pull_request demo Repository policies have configured review-routing.yml to restrict events it can run. This is so it can run pull_request_target, but it is not configured to run pull_request, so it fails to start up. We can work around this temporarily by creating a second, temporary workflow that uses the pull_request event, with the workflow contents otherwise identical. * Restore CODEOWNERS to original state Let's keep this additive for now * Assign self as reviewer for design system work Cannot assign teams for now, do individual opt-in for now until we can be sure it's working * Automated Testing: Add ciampo as reviewer for design system routing * Remove temporary changes Co-authored-by: aduth <aduth@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>

What?
Updates the review routing automation added in #86449 to trigger real requested reviews,
replacing CODEOWNERS entries for the components team(Edit: CODEOWNERS is unchanged for now, as this will be additive for now pending further testing).Why?
See #86325's "Why?" for a full rationale of what this is working toward.
This stage does the effective replacement for how we use CODEOWNERS today for the components team.
Future iterations will still continue to refine the routing, in response to observed false negatives and false positives. Additionally, I'd like to improve visibility of how reviews are assigned, such as part of the "PR Meta" comment explaining which rule matched a reviewer and with what score / threshold.
How?
review-routing.ymlworkflow with a new step to assign review.@wordpress/review-routing-toolsso that it can simultaneously output both markdown and JSON, so that the markdown can be used in the workflow summary, while the JSON data used in the review assignment logic.RemovesEdit: CODEOWNERS is unchanged for now, as this will be additive for now pending further testing@wordpress/gutenberg-componentsfrom CODEOWNERS entries.Note that if anyone would prefer to remain as CODEOWNERS, it's completely reasonable to keep individuals in the CODEOWNERS. Just let me know and I'll add you!Testing Instructions
This pull request will be used for demonstration.
pull_requestevent trigger so the workflow updates are run in the context of this branch. Verify that no reviews are requested, since this pull request is not especially relevant for components team review.Use of AI Tools
Researched and implemented in coordination with Claude Code + Opus 5.5, with some manual edits to comment text.