pr-comments

Post inline PR review comments to GitHub diffs via the gh CLI.

Updated Mar 18, 2023
One-click install
npx skills add https://github.com/acmacalister/dotfiles --skill pr-comments-acmacalister
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-comments
Source: https://github.com/acmacalister/dotfiles/tree/main/dot_config/crush/skills/pr-comments
Command: npx skills add https://github.com/acmacalister/dotfiles --skill pr-comments-acmacalister

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Submitting code quality feedback directly on changed lines in a PR can be tedious when switching between review tools. This Skill automates posting inline comments using the gh CLI and GitHub PR Reviews API to streamline code reviews.

Core Features & Use Cases

  • Inline comments on diffs via the GitHub PR Reviews API and gh CLI to attach feedback to specific lines.
  • Prevents duplicate comments by checking existing reviews before posting new ones.
  • Supports multi-file PRs and context-aware commenting to improve reviewer clarity.

Quick Start

Post inline PR review comments on a GitHub pull request using the gh CLI.

Frequently Asked Questions about pr-comments

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

FAQPage Schema
How do I post inline PR review comments on specific diff lines using gh CLI?

To post inline PR review comments on specific diff lines, this Skill automates submitting feedback to changed lines across multiple files using the gh CLI and the GitHub PR Reviews API. It requires the repository owner, repository name, and PR number.

Can I prevent duplicate code review comments when automating pull request feedback?

Yes, you can prevent duplicate code review comments because this Skill checks existing PR reviews before posting new ones. It deduplicates comments to avoid submitting redundant feedback on the same changed lines.

What do I need to generate a PR review payload for the GitHub Reviews API?

To generate a PR review payload for the GitHub Reviews API, you need the repository owner, repository name, and PR number. This Skill includes steps to build the payload via Python for context-aware inline commenting.

Does this approach support posting code review comments across multiple files in a pull request?

Yes, this approach supports posting code review comments across multiple files in a pull request. It leverages the GitHub PR Reviews API to attach context-aware feedback directly to changed lines throughout the entire PR diff.

What is the best way to automate code review feedback directly on a GitHub diff?

The best way to automate code review feedback directly on a GitHub diff is using the gh CLI combined with the PR Reviews API. This Skill streamlines the process by generating a review payload and posting inline comments to specific changed lines.