github-pr-review-operation

Fetch GitHub PR data, diffs, and comments via gh.

6|Updated Dec 28, 2023
One-click install
npx skills add https://github.com/staticWagomU/dotfiles --skill github-pr-review-operation-staticwagomu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-review-operation
Source: https://github.com/staticWagomU/dotfiles/tree/main/config/claude/skills/github-pr-review-operation
Command: npx skills add https://github.com/staticWagomU/dotfiles --skill github-pr-review-operation-staticwagomu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines GitHub pull request reviews by automating data gathering, diff inspection, and comment management via the GitHub CLI (gh).

Core Features & Use Cases

  • PR information retrieval: fetch title, body, author, state, and URLs for quick context.
  • Diff analysis: obtain diffs with line-numbering to pinpoint changes.
  • Comment management: read issue/pr comments, post new comments, and add inline review replies to specific lines.
  • PR operation flows: perform common review actions (approve, request changes, merge) through gh commands in scripted workflows.

Quick Start

Review a PR by providing its URL and repository, and the skill will fetch details, analyze diffs, and begin enabling review comments automatically.

Frequently Asked Questions about github-pr-review-operation

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

FAQPage Schema
How do I automate GitHub pull request reviews with gh?

You can automate GitHub pull request reviews by using gh to fetch PR data, analyze diffs with line numbers, and post inline or general comments. This requires gh authentication and the specific OWNER/REPO plus PR number.

Can I post inline comments on specific lines of a PR diff?

Yes, you can post inline comments on specific lines. The skill interfaces with gh to fetch diffs with line-numbering and enables adding review replies directly to targeted lines in the pull request.

What information do I need to fetch PR data and comments?

To fetch PR data and comments you need gh authentication and defined PR identifiers, specifically the OWNER/REPO and the PR number. This allows extraction of titles, bodies, states, and URLs.

Does this approach support automated code reviews across multiple repositories?

Yes, this approach supports automated reviews across multiple repositories. By providing the distinct OWNER/REPO and PR number for each target, you can script workflows to fetch diffs and manage comments across repos.

What is the best way to perform review actions like approve or merge via gh?

The best way to perform review actions like approve, request changes, or merge is through scripted workflows that execute gh commands. This allows you to automate common pull request operations seamlessly.

Why do I need gh authentication to extract pull request diffs?

You need gh authentication to extract pull request diffs because the skill directly interfaces with the GitHub CLI to access repository data, post comments, and perform review actions securely.