Request reviews from every other member of the PR author's GitHub org squad.
Team slugs are not configured in consumer workflows. The action queries org teams the author belongs to, keeps leaf teams (no child teams), prefers nested teams over top-level catch-alls, and if several remain picks the smallest. Org-wide slugs such as everyone / all-staff are skipped.
token must be a PAT (or GitHub App token) with repo and read:org. GITHUB_TOKEN cannot list org teams.
| Name | Description |
|---|---|
token |
Required PAT with repo + read:org. ${{ secrets.GH_TOKEN }} |
org |
GitHub org. Defaults to the repository owner. |
production-teams |
Deprecated and ignored. Kept so existing workflows do not break. |
default-token |
Token used to request reviewers. Defaults to ${{ github.token }}. |
name: auto-assign-reviewers
permissions:
pull-requests: write
on:
pull_request:
types: [opened, reopened]
jobs:
assign:
runs-on: ubuntu-latest
steps:
- uses: LeavittSoftware/auto-pr-assign@master
with:
token: ${{ secrets.GH_TOKEN }}