Skip to content

Initial implementation of review-roulette github action - #1

Merged
andrcuns merged 15 commits into
mainfrom
feat/review-roulette
Oct 28, 2026
Merged

andrcuns merged 15 commits into
mainfrom
feat/review-roulette

Conversation

@andrcuns

@andrcuns andrcuns commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Introduces Review roulette, a GitHub Action that helps distribute pull-request reviews by suggesting the reviewer with the fewest outstanding review requests, with an option to request their review automatically.

Features

  • Configurable reviewer pool: supply a comma- or newline-separated list of GitHub usernames, or omit it to use GitHub's native reviewer suggestions for the pull request.
  • Workload-based selection: counts outstanding personal review requests on open pull requests, excludes the PR author, and randomly chooses among reviewers tied for the lowest count. Submitted reviews and PR assignments do not count toward workload.
  • Repository or organization scope: measures workload within the target repository by default, or across multiple configured organizations. Counts include only repositories accessible to the supplied token.
  • Suggestion-only or automatic assignment: defaults to publishing a suggestion. Enable assign-reviewer to also request review without removing existing reviewers.
  • One managed PR comment: shows the selected reviewer's profile link, pending-review count, and assignment status. Reviewer names retain the @ prefix as links rather than direct mentions.
  • Rerun-aware behavior: updates the existing managed comment, preserves an eligible previous selection when appropriate, and avoids requesting the same review again while it is already outstanding.
  • Workflow outputs: exposes reviewer, review-count, and assigned for downstream steps.
  • Metadata-only operation: requires no checkout of the pull request's code. Supports privileged fork workflows through pull_request_target when configured safely.

Usage

- uses: allure-framework/review-roulette@<commit-sha>
  with:
    reviewers: |
      alice
      bob
      carol
    # Optional: request review in addition to posting a suggestion.
    assign-reviewer: "true"

The workflow needs pull-requests: write, including in suggestion-only mode because it posts a comment. The default token is github.token; use a suitably scoped GitHub App token or PAT to count workloads across repositories or organizations. Omit reviewers to enable automatic reviewer discovery.

For fork PRs, use a trusted, pinned action in a metadata-only pull_request_target workflow; never check out or execute PR-head code with privileged credentials. See the README for complete workflow examples, token requirements, and rerun behavior.

@andrcuns
andrcuns force-pushed the feat/review-roulette branch 2 times, most recently from 12e3f96 to 271e144 Compare October 27, 2026 08:05
@andrcuns
andrcuns force-pushed the feat/review-roulette branch from 271e144 to 74ae786 Compare October 27, 2026 08:06
@andrcuns
andrcuns force-pushed the feat/review-roulette branch from f55f09e to 501cbc6 Compare October 27, 2026 17:55
@github-actions

Copy link
Copy Markdown

Review roulette

Category Suggested reviewer
All @epszaw — 0 pending review requests

Suggestion only; no review request was created.

@andrcuns andrcuns self-assigned this Oct 28, 2026
@andrcuns
andrcuns merged commit c6a188e into main Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant