Fetch unread review_requested notifications for open (unmerged) PRs, filtered by a GitHub team.
Requires: GitHub CLI (gh) authenticated.
If the user has not specified a team, ask:
Which GitHub team should I filter by? (e.g. streaming-platform)
Accept a slug or display name, then resolve it against the authenticated organization's actual teams.
No fetch_review_requests.py script is bundled in this AAS entrypoint. Use the
configured GitHub connector or authenticated gh API rather than inventing it.
Confirm the organization and exact team slug from its API; display-name conversion
alone cannot prove the slug. Do not default every repository to getsentry.
gh api notifications --paginate
Keep unread review_requested notifications whose subject is a pull request.
Follow the returned subject API URL only after verifying GitHub origin and repository.
For each candidate, inspect open/unmerged state, requested reviewer teams, and the
selected team's paginated membership. Being authored by a teammate is distinct from
being assigned for review. Do not mark notifications read or submit reviews.
Return the actual API results as rows with PR URL, author, and observed reason.
Missing permissions or incomplete pagination must be reported as incomplete, not zero.
Display results as a markdown table with full URLs:
| # | Title | URL | Reason |
|---|---|---|---|
| 1 | feat(kafka): add workflow to restart a broker | https://github.com/getsentry/ops/pull/19144 | opened by: evanh |
If total is 0, say: "No unread review requests found for that team."