Reuse existing review requests#474
Conversation
Prefer an existing requested reviewer or team before falling back to PR assignees or ownership-based reviewer selection for non-member approve reviews. Co-Authored-By: Oz <oz-agent@warp.dev>
5e6a264 to
42ea7aa
Compare
| recommended_reviewers = _reviewer_from_existing_review_request( | ||
| pr, | ||
| owner=owner, | ||
| pr_author_login=pr_author_login, | ||
| ) | ||
| if not recommended_reviewers: | ||
| recommended_reviewers = _reviewer_from_pr_assignee( | ||
| pr, | ||
| pr_author_login=pr_author_login, | ||
| ) | ||
| if not recommended_reviewers: | ||
| ownership_areas = [ | ||
| OwnershipArea( |
There was a problem hiding this comment.
nit: we can probably express this in python more cleanly, through a three-tier conditional?
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
Co-Authored-By: Oz <oz-agent@warp.dev>
There was a problem hiding this comment.
Overview
This PR updates non-member approval handling to prefer an already requested reviewer or team before falling back to assignees or ownership-area selection, and adds regression coverage for existing user and team review requests.
Concerns
- No blocking concerns found.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
What
Prefer an existing requested reviewer or team when applying a successful non-member
/oz-reviewresult.Why
Repeated review runs should re-request the same pending reviewer instead of sampling another owner from ownership areas.
Linear: https://linear.app/warpdotdev/issue/APP-4655/reuse-existing-reviewers-for-oz-for-oss-review-requests
Public issue: #473
How
requested_reviewersandrequested_teamsbefore assignee and ownership fallback selection.Verification
/tmp/oz-for-oss-venv/bin/python -m unittest tests/test_review_pr_reviewer_sampling.py/tmp/oz-for-oss-venv/bin/python -m py_compile core/workflows/review_pr.py tests/test_review_pr_reviewer_sampling.pyConversation: https://staging.warp.dev/conversation/88e26142-7074-4987-a3ad-d1d03aecc7d2
Run: https://oz.staging.warp.dev/runs/019e8eac-a7f0-73f7-ab11-490077f67dc2
This PR was generated with Oz.