Skip to content

ci: auto-assign a round-robin reviewer to new PRs#1760

Open
notgitika wants to merge 2 commits into
mainfrom
feat/pr-reviewer-assignment
Open

ci: auto-assign a round-robin reviewer to new PRs#1760
notgitika wants to merge 2 commits into
mainfrom
feat/pr-reviewer-assignment

Conversation

@notgitika

@notgitika notgitika commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

External PRs currently land in a shared queue with no named reviewer, so many sit unreviewed.

This PR adds a workflow that requests one reviewer per new non-draft PR when the PR author is not in the existing AUTHORIZED_USERS roster. Reviewers are selected round-robin from that roster. PRs authored by someone in AUTHORIZED_USERS are left unassigned, and PRs that already have a reviewer are skipped.

Safety: follows the metadata-only pull_request_target pattern from pr-size.yml (needed so fork PRs can be assigned; safe because no PR code is checked out or executed, only PR metadata is read and a reviewer requested).

Future work: We can look into adding a CODEOWNERS file and then editing this workflow to make sure the right folks with context are tagged in PRs. I will also be looking into a simple starter system to assignees to get pinged on our slack

New PRs currently land in a shared queue with no named reviewer, so many
sit unreviewed. This adds a workflow that requests one reviewer per new
non-draft PR, round-robin over the existing AUTHORIZED_USERS roster
(pr.number % pool), skipping PRs that already have a reviewer and never
assigning the author.

Follows the metadata-only pull_request_target pattern from pr-size.yml
(needed so fork PRs can be assigned; safe because no PR code is checked
out). Also adds a dry-run-by-default sweep script to assign reviewers to
the existing backlog of unreviewed PRs.
@github-actions github-actions Bot added size/m PR size: M agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Jul 14, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.24.1.tgz

How to install

gh release download pr-1760-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.24.1.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.91% 14809 / 37101
🔵 Statements 39.17% 15782 / 40286
🔵 Functions 33.97% 2522 / 7423
🔵 Branches 33.41% 9863 / 29521
Generated in workflow #4101 for commit 75455cb by the Vitest Coverage Report Action

@github-actions github-actions Bot added size/s PR size: S and removed size/m PR size: M labels Jul 15, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 15, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 15, 2026
@notgitika notgitika marked this pull request as ready for review July 15, 2026 15:59
@notgitika notgitika requested a review from a team July 15, 2026 15:59
@@ -0,0 +1,67 @@
name: Assign PR Reviewer (round-robin)

# Auto-assigns one reviewer to each new external PR, so community contributions

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.

Are there ideas in the comment here that we don't feel like are expressed clearly below in the implementation, if so why?


// Stateless round-robin: PR number modulo pool size. Deterministic, no state
// file to keep in sync, and spreads load evenly as PR numbers increase.
const reviewer = pool[pr.number % pool.length];

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.

clever :)

@@ -0,0 +1,67 @@
name: Assign PR Reviewer (round-robin)

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.

broader q: is there any prior art you were able to find in your research? Does the strands team have anything?

I'm wondering about what happens if the assigned reviewer isn't available (PTO), or busy with another project. Also is there a clear path to overriding the assigned reviewer here if I want someone else to review?

Also wondering if a no-code solution might be simpler. For example, on-call responsible for external PR review for their week, or we delegate these are part of sprint work.

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

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants