Skip to content

PR review bot#3326

Open
souvikghosh04 wants to merge 18 commits intomainfrom
Usr/sogh/prreviewbot
Open

PR review bot#3326
souvikghosh04 wants to merge 18 commits intomainfrom
Usr/sogh/prreviewbot

Conversation

@souvikghosh04
Copy link
Copy Markdown
Contributor

@souvikghosh04 souvikghosh04 commented Mar 26, 2026

Why make this change?

Automate PR reviewer assignment to distribute review workload evenly across the team instead of relying on manual assignment or CODEOWNERS (which adds all owners).

What is this change?

Adds auto-assign-reviewers.yml, a label-driven GitHub Actions workflow that assigns exactly 2 reviewers per PR using load-balanced selection.

High-level workflow steps-

  1. Fetches all open PRs → filters to eligible ones (label + non-draft + fresh)
  2. Reads pr.assignees for each PR → determines who's already assigned
  3. Calls listReviews for PRs with assignees → determines who's actively reviewing vs freed
  4. Builds load map from scratch → sums active review weights per reviewer
  5. Assigns based on current state

How is this tested?

  • Tested with DRY_RUN and non-DRY_RUN mode and validated the assigned reviewers.

@souvikghosh04 souvikghosh04 self-assigned this Mar 26, 2026
@souvikghosh04 souvikghosh04 marked this pull request as ready for review March 26, 2026 17:38
Copilot AI review requested due to automatic review settings March 26, 2026 17:38
@souvikghosh04 souvikghosh04 added this to the April 2026 milestone Mar 26, 2026
@souvikghosh04 souvikghosh04 linked an issue Mar 26, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow intended to automatically assign reviewers to PRs based on labels and a simple load-balancing heuristic.

Changes:

  • Introduces .github/workflows/auto-assign-reviewers.yml to select and request reviewers when PRs are opened/updated/labeled.
  • Implements label-based eligibility (assign-for-review) and weighting (size-*, priority-high) to prioritize larger/higher priority PRs.
  • Tracks current reviewer “load” across open PRs to pick the least-loaded candidates.

@souvikghosh04 souvikghosh04 moved this from Todo to In Progress in Data API builder Mar 27, 2026
@aaronburtle aaronburtle self-assigned this Mar 28, 2026
@aaronburtle aaronburtle moved this from In Progress to Review In Progress in Data API builder Mar 28, 2026
Copy link
Copy Markdown
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

Idea is good, but missing testing to ensure this actually works.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

Automated PR review assignment bot

5 participants