Skip to content

chore(ci): Add round-robin reviewer auto-assignment#720

Merged
jiayuasu merged 3 commits into
mainfrom
add-auto-assign-reviewer
Mar 17, 2026
Merged

chore(ci): Add round-robin reviewer auto-assignment#720
jiayuasu merged 3 commits into
mainfrom
add-auto-assign-reviewer

Conversation

@jiayuasu
Copy link
Copy Markdown
Member

Automatically assigns one reviewer per PR in round-robin from the list in .github/reviewers.json.

How it works:

  • assign-reviewer.yml (triggered by pull_request) captures PR number and author into an artifact
  • assign-reviewer-write.yml (triggered by workflow_run) reads the artifact, loads the reviewer list from the trusted main branch, computes the round-robin pick, and assigns the reviewer

This follows the ASF-recommended pull_request + workflow_run split pattern to safely handle fork PRs without using pull_request_target. See ASF GitHub Actions Security.

To update the reviewer list, edit .github/reviewers.json — no workflow changes needed.

@jiayuasu jiayuasu changed the title Add round-robin reviewer auto-assignment chore(CI): Add round-robin reviewer auto-assignment Mar 17, 2026
@jiayuasu
Copy link
Copy Markdown
Member Author

@paleolimbot This is to enable (approx.) round-robin PR review assignment on SedonaDB.

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 secure GitHub Actions-based automation to request one reviewer per newly opened PR using a deterministic round-robin selection from a repo-managed list, implemented via the ASF-recommended pull_request + workflow_run split to support fork PRs safely.

Changes:

  • Introduces a pull_request workflow that captures PR metadata and uploads it as an artifact.
  • Introduces a workflow_run workflow (with write permissions) that reads the artifact, loads reviewers from main, computes the assignee, and requests a review.
  • Adds .github/reviewers.json as the single source of truth for the reviewer pool.

Reviewed changes

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

File Description
.github/workflows/assign-reviewer.yml Captures PR number/author on PR open and uploads metadata artifact.
.github/workflows/assign-reviewer-write.yml Downloads metadata from the prior run, reads trusted reviewer config from main, and requests a reviewer.
.github/reviewers.json Defines the reviewer rotation list used by the assignment workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/assign-reviewer-write.yml
Comment thread .github/workflows/assign-reviewer-write.yml
Comment thread .github/workflows/assign-reviewer.yml
@paleolimbot paleolimbot changed the title chore(CI): Add round-robin reviewer auto-assignment chore(ci): Add round-robin reviewer auto-assignment Mar 17, 2026
Copy link
Copy Markdown
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Happy to give this a try!

@jiayuasu jiayuasu merged commit 3800690 into main Mar 17, 2026
9 checks passed
@jiayuasu jiayuasu deleted the add-auto-assign-reviewer branch March 18, 2026 04:37
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.

3 participants