gh-address-comments

Automate discovering and addressing comments on the current branch's open PR using the gh CLI.

5|1|Updated Dec 30, 2024
One-click install
npx skills add https://github.com/crossxwill/IML4Finance --skill gh-address-comments-crossxwill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-address-comments
Source: https://github.com/crossxwill/IML4Finance/tree/main/.github/skills/gh-address-comments
Command: npx skills add https://github.com/crossxwill/IML4Finance --skill gh-address-comments-crossxwill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates discovering and addressing comments on the open PR for the current branch using the gh CLI; verifies authentication before proceeding and prompts to login if not authenticated.

Core Features & Use Cases

  • Finds the open PR associated with the current branch and addresses its comments using gh CLI.
  • Enforces authentication by guiding users to run gh auth login/status and prompts for re-authentication if needed.
  • Provides a workflow to inspect, enumerate, and apply fixes to selected review threads and comments.

Quick Start

Run scripts/fetch_comments.py to fetch all PR comments for the current branch's open PR.

Frequently Asked Questions about gh-address-comments

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

FAQPage Schema
How do I automatically address pull request comments using the gh CLI?

Automating pull request comment addressing involves using a Python script that leverages the gh CLI to fetch the open PR for your current branch, enumerate its review threads, and apply fixes. It verifies authentication before proceeding and prompts login if needed.

What happens if my gh CLI is not authenticated when addressing PR comments?

When gh CLI is not authenticated, the workflow checks authentication status and prompts you to run gh auth login or gh auth status. It enforces authentication before allowing you to fetch and address PR comments.

Can I use this workflow to address comments across multiple repositories?

Yes, the workflow operates across repositories by using the current git branch context and gh CLI to discover the associated open PR. It enumerates comments and presents options to apply fixes regardless of the specific repository.

How do I fetch all PR comments for the current branch's open PR?

To fetch all PR comments, run the scripts/fetch_comments.py Python script. It uses the gh CLI and the repository's current git branch context to enumerate review threads and comments on the active PR.

Do I need to escalate permissions if sandboxing blocks gh CLI during comment management?

Yes, if sandboxing blocks the gh CLI, you need the ability to escalate permissions to allow the script to access the repository context and apply fixes. The workflow relies on authenticated gh access and may require elevated permissions to function.