domains / software-engineering / github-review-queue / gh-review-requests

gh-review-requests

Skill card

combined

The first copy (getsentry/skills) provides a specific, executable procedure using a bundled Python script (`fetch_review_requests.py`) and `uv`, which is the primary method for the original skill. The second copy (sickn33/agentic-awesome-skills) explicitly states that the script is not bundled and provides a manual `gh api` fallback as the primary method, adding safety constraints (e.g., verifying origin, not marking as read) that the first copy lacks. Because the first copy relies on a script that the second copy says is missing, and the second copy adds operational safety steps, crowning one would hide the alternative manual procedure or the specific tooling dependency.

Repositories

RepositoryPath
getsentry/skillsskills/gh-review-requests/SKILL.md
sickn33/agentic-awesome-skillsplugins/agentic-awesome-skills-claude/skills/gh-review-requests/SKILL.md

Other copies

RoleRepositoryPath
peergetsentry/skillsskills/gh-review-requests/SKILL.md
peersickn33/agentic-awesome-skillsplugins/agentic-awesome-skills-claude/skills/gh-review-requests/SKILL.md
adaptersickn33/agentic-awesome-skillsplugins/agentic-awesome-skills/skills/gh-review-requests/SKILL.md
adaptersickn33/agentic-awesome-skillsskills/gh-review-requests/SKILL.md

Combined skill

---
name: gh-review-requests
description: Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member.
allowed-tools: Bash
---

# GitHub Review Requests

Fetch unread `review_requested` notifications for open (unmerged) PRs, filtered by a GitHub team.

**Requires**: GitHub CLI (`gh`) authenticated.

## Step 1: Identify the Team

If the user has not specified a team, ask:

> Which GitHub team should I filter by? (e.g. `streaming-platform`)

Accept either a team slug or a display name. Resolve the slug against the authenticated organization's actual teams to ensure accuracy.

## Step 2: Fetch Review Requests

### Method A: Bundled Script (if available)

If the `scripts/fetch_review_requests.py` script is present in the environment, use it with `uv`:

```bash
uv run scripts/fetch_review_requests.py --org <org> --teams <team-slug>
```

### Method B: Manual API (Fallback or Primary)

If the script is not available, or to verify results, use the GitHub API directly:

1. Fetch notifications:
   ```bash
   gh api notifications --paginate
   ```
2. Filter for unread `review_requested` notifications where the subject is a pull request.
3. For each candidate PR:
   - Verify the PR is open and not merged: `gh api repos/{repo}/pulls/{number}`
   - Check requested reviewers: `gh api repos/{repo}/pulls/{number}/requested_reviewers`
   - Check team membership of the author: `gh api orgs/{org}/teams/{slug}/members`

**Safety Constraints**:
- Do not mark notifications as read.
- Do not submit reviews.
- Report incomplete pagination or permission errors as "incomplete", not zero.

## Step 3: Present Results

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."