pr-comments

Fetch GitHub PR review comments for the current branch and output JSON.

64.1k|5.4k|Updated Jul 8, 2021
One-click install
npx skills add https://github.com/warpdotdev/warp --skill pr-comments-warpdotdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-comments
Source: https://github.com/warpdotdev/warp/tree/main/resources/bundled/skills/pr-comments
Command: npx skills add https://github.com/warpdotdev/warp --skill pr-comments-warpdotdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, git, and includes scripts (resource) components.

What problem does it solve?

Fetch and display GitHub PR review comments for the current branch.

Core Features & Use Cases

  • Fetch PR-level issue comments, diff comments, and code-review comments for the PR on the current branch.
  • Display and structure comments with location metadata (file path, line, side) and allow the user to review comments batch by batch before actions.
  • Use case: In a code review workflow, surface all comments to discuss changes on the active PR without leaving your terminal.

Quick Start

Run the bundled Python script from within a git repository that has an open PR on the current branch to fetch and display review comments.

Frequently Asked Questions about pr-comments

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

FAQPage Schema
How do I fetch GitHub PR review comments for my current branch?

To fetch GitHub PR review comments for your current branch, run the bundled Python script inside a local git repository with an open PR. It outputs a JSON payload containing local_repository_path, base_branch, and all comments.

What types of pull request comments can I display in my terminal?

You can display PR-level issue comments, file-level diff comments, and code-review comments. The script structures these with location metadata like file path, line, and side for clear terminal viewing.

Do I need the gh CLI to retrieve diff comments for a local repository?

Yes, you need both the gh CLI and git installed. The Skill relies on gh to authenticate and pull PR review comments from GitHub for the active local branch.

How does this handle code review feedback batch by batch?

It surfaces PR-level, file-level diff, and code-review feedback, allowing you to review comments batch by batch. This structured output ensures you can address code review feedback without leaving your terminal.

Can I use this to get location metadata for code review comments?

Yes, the script fetches and structures comments with specific location metadata including file path, line, and side. This allows precise insertion of code review comments back into your local repository.

What is the output format when fetching PR comments?

The output is a JSON payload containing local_repository_path, base_branch, and comments. This structured format is designed for insertion via the insert_code_review_comments function.