Skip to content

Reuse existing review requests#474

Merged
vkodithala merged 2 commits into
mainfrom
warp1/app-4655-reuse-existing-reviewers
Jun 15, 2026
Merged

Reuse existing review requests#474
vkodithala merged 2 commits into
mainfrom
warp1/app-4655-reuse-existing-reviewers

Conversation

@vkodithala

Copy link
Copy Markdown
Contributor

What

Prefer an existing requested reviewer or team when applying a successful non-member /oz-review result.

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

  • Check requested_reviewers and requested_teams before assignee and ownership fallback selection.
  • Reuse the existing reviewer/team through the existing review-request path.

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.py

Conversation: 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.

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>
@vkodithala vkodithala force-pushed the warp1/app-4655-reuse-existing-reviewers branch from 5e6a264 to 42ea7aa Compare June 15, 2026 16:16
Comment thread core/workflows/review_pr.py Outdated
Comment on lines 1457 to 1469
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(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nit: we can probably express this in python more cleanly, through a three-tier conditional?

@vkodithala vkodithala marked this pull request as ready for review June 15, 2026 16:24
@oz-for-oss

oz-for-oss Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@vkodithala

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Co-Authored-By: Oz <oz-agent@warp.dev>

@oz-for-oss oz-for-oss Bot 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.

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

@vkodithala vkodithala merged commit 90a49da into main Jun 15, 2026
4 checks passed
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