github-pr-comments

Fetch and apply GitHub PR review comments with code context.

7.5k|1.4k|Updated Dec 8, 2024
One-click install
npx skills add https://github.com/tailcallhq/forgecode --skill github-pr-comments-tailcallhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-comments
Source: https://github.com/tailcallhq/forgecode/tree/main/.forge/skills/github-pr-comments
Command: npx skills add https://github.com/tailcallhq/forgecode --skill github-pr-comments-tailcallhq

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automates the resolution of inline code review comments on GitHub pull requests by extracting each comment with its surrounding code context and applying changes deterministically.

Core Features & Use Cases

  • Fetch all review comments for a PR with surrounding code context and diffs.
  • Create a per-comment to-do item before applying changes to ensure nothing is missed.
  • Apply changes either from a suggested block or as interpreted edits, leveraging the diff context to maintain consistency.
  • Verify changes locally via cargo check and tests to ensure code compiles and tests pass (as described in the workflow).

Quick Start

Run the pr-comments script with an optional PR number to process active review threads.

Frequently Asked Questions about github-pr-comments

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

FAQPage Schema
How do I automate resolving GitHub PR review comments with code context?

Automate resolving GitHub PR review comments by fetching inline diff hunks and suggestions to apply changes deterministically. The script extracts reviewer notes across multi-file changes and converts them into concrete edits or to-do items.

What's the best way to convert GitHub inline code review suggestions into local edits?

Converting GitHub inline code review suggestions into local edits is best handled by applying suggested blocks or interpreted edits using diff context. This approach maintains consistency across multi-file changes and verifies results locally via cargo check and tests.

Do I need the gh CLI and a Rust toolchain to apply PR review feedback automatically?

Yes, applying PR review feedback automatically requires a local environment with the gh CLI, Git, and a Rust toolchain. The provided scripts depend on gh, jq, and sed to fetch comments and apply changes deterministically.

How does diff context help manage to-do items from multi-file PR review changes?

Diff context helps manage to-do items by creating a per-comment task before applying changes, ensuring nothing is missed. It reads inline diff hunks and suggestions to apply changes consistently across multi-file PR updates.

How do I verify that automated PR comment edits compile and pass tests?

Verify automated PR comment edits compile and pass tests by running cargo check and tests locally after applying changes. The workflow ensures that interpreted edits from diff context maintain code consistency and functionality.