mcpField
G
gh-review-requests

gh-review-requests

github.com/getsentryDevelopment1.1k4.2k installsUpdated 5d ago
Repository

About gh-review-requests

gh-review-requests is a skill for finding unread GitHub review requests on open pull requests associated with a specified team. It uses the authenticated GitHub CLI and presents matching requests for review.

Key features

  1. 01Filter unread review requests by team
  2. 02Include open, unmerged pull requests
  3. 03Match team reviewer or PR author membership
  4. 04Show results with full pull request URLs

Use cases

  1. 01Check a team’s outstanding GitHub review requests
  2. 02Find open pull requests authored by team members
  3. 03Review requests for one or more teams

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/getsentry/skills --skill gh-review-requests

After installing, type/gh-review-requestsin Claude Code to confirm it loaded.

Bundled filesscripts/fetch_review_requests.py

Details

From the project README

GitHub Review Requests

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

Requires: GitHub CLI (gh) authenticated.

Requires: The uv CLI for python package management, install guide at https://docs.astral.sh/uv/getting-started/installation/

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 (streaming-platform) or a display name ("Streaming Platform") — convert to lowercase-hyphenated slug before passing to the script.

Step 2: Run the Script

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

To filter by multiple teams, pass a comma-separated list:

uv run scripts/fetch_review_requests.py --org getsentry --teams <team slugs>
Script output
{
  "total": 3,
  "prs": [
    {
      "notification_id": "12345",
      "title": "feat(kafka): add workflow to restart a broker",
      "url": "https://github.com/getsentry/ops/pull/19144",
      "repo": "getsentry/ops",
      "pr_number": 19144,
      "author": "bmckerry",
      "reasons": ["opened by: bmckerry"]
    }
  ]
}

reasons will contain one or both of:

  • "review requested from: <Team Name>" — the team is a requested reviewer
  • "opened by: <login>" — the PR author is a team member

Step 3: Present Results

Display results as a markdown table with full URLs:

#TitleURLReason
1feat(kafka): add workflow to restart a brokerhttps://github.com/getsentry/ops/pull/19144opened by: evanh

If total is 0, say: "No unread review requests found for that team."

Fallback

If the script fails, run manually:

gh api notifications --paginate

Then for each review_requested notification, check:

  • gh api repos/{repo}/pulls/{number} — skip if state == "closed" or merged_at is set
  • gh api repos/{repo}/pulls/{number}/requested_reviewers — check teams[].name
  • gh api orgs/{org}/teams/{slug}/members — check if author is a member

Comments

Markdown supported