GitHub PR comment fetcher

Fetches pull request reviews and comment threads with resolved status via GitHub CLI.

4.4k|1.3k|Updated Jan 23, 2012
One-click install
npx skills add https://github.com/paulirish/dotfiles --skill github-pr-comment-fetcher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: GitHub PR comment fetcher
Source: https://github.com/paulirish/dotfiles/tree/main/agents/skills/github-pr-comments
Command: npx skills add https://github.com/paulirish/dotfiles --skill github-pr-comment-fetcher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Reviewing open discussions on a GitHub pull request requires manually navigating the web UI, and it is hard to tell which comment threads are resolved versus still open. This Skill gathers all reviews, general comments, and review threads for a PR into structured Markdown and JSON output so an agent can help resolve outstanding feedback.

Core Features & Use Cases

  • Review Thread Fetching: Uses the GitHub CLI (gh) GraphQL API to retrieve review threads along with their resolved status, diff hunks, file paths, and line numbers.
  • Structured Markdown Output: Separates review summaries, general comments, resolved discussions, and open discussions into clearly labeled sections.
  • Use Case: An agent working on a pull request can run the script to list all unresolved review comments, present them to the user, and then address each open discussion one by one.

Quick Start

Ask the agent to fetch the open review comments for a specific pull request by providing the repository in owner/repo format and the PR number.

Frequently Asked Questions about GitHub PR comment fetcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch all review comments on a GitHub pull request?

Run the gather-reviews script with the repository in owner/repo format and the PR number, for example: node scripts/gather-reviews.ts GoogleChrome/lighthouse 14425. It uses the GitHub CLI GraphQL API to retrieve review threads, general comments, and review summaries.

How can I check which PR review threads are resolved?

The script queries the isResolved field on each review thread via the GitHub GraphQL API. The generated Markdown output separates threads into Resolved Discussions and Open Discussions sections so you can focus on outstanding feedback.

Does this require the GitHub CLI to be installed?

Yes, the script shells out to the gh command to run GraphQL queries against the GitHub API. You must have gh installed and authenticated with access to the target repository before running it.

What output formats does the PR comment fetcher produce?

The script produces a Markdown document with sections for review summaries, general comments, resolved discussions, and open discussions, including diff hunks in collapsible details blocks. It also writes the gathered data as JSON to the skill's resources directory.

Does the script cache pull request review data?

No, caching is intentionally not implemented. Every run fetches fresh data from the GitHub API so agents always work with the most up-to-date state of the pull request discussions.