跳到正文
cccskills
免费在 GitHub 公开

github-pull-request-handling

Handle pull requests and review comments using GitHub CLI (gh). Use when the user wants to check PR comments, address review feedback, reply with commit hashes, or work with pull requests.

中文简介正在准备中。当前显示原文说明。

集成工具GitHub
查看安装方法

包含的文件(2)

  • SKILL.md3.4 KB
  • scripts/pr-conversations.sh4.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

PR and Review Comment Handling

Guides fetching unresolved PR conversations, addressing them with fixes, and replying with commit references.

Prerequisites

  • GitHub CLI (gh) installed and authenticated
  • jq for formatting (used by pr-conversations.sh)
  • Current branch has an associated PR, or user provides PR number

PR lifecycle focus

Stage: Post-review conversation handling (after review comments exist).

Use Instead [if available]

  • Use pr-create to draft/open a new PR.
  • Use pr-self-review before requesting external review.
  • Use pr-review for reviewer-side structured code review.

Workflow

1. Fetch unresolved conversations

The skill base directory is shown at the top of the loaded skill content. Use it to construct the script path:

# Replace SKILL_BASE_DIR with the base directory shown in the skill header:
SKILL_BASE_DIR/scripts/pr-conversations.sh [PR_NUMBER]        # unresolved only (default)
SKILL_BASE_DIR/scripts/pr-conversations.sh --all [PR_NUMBER]  # all threads

Uses the GitHub GraphQL API to fetch review threads with resolution status. Output:

  • ○ unresolved thread
  • ✓ resolved thread (only with --all)
  • ⚠ outdated thread (code changed since comment)
  • ● first comment in the conversation
  • └ subsequent replies

Threads are sorted by file path and line number. Only act on ○ unresolved threads.

2. Address each unresolved conversation

  • Read the full thread — understand the root comment and any replies before acting
  • Create a test for bugs and fix them
  • One commit per conversation: Fix each issue in a separate commit for traceability
  • Use conventional commit format: fix(scope): description

3. Reply via API with commit hash

Use clickable links so reviewers can jump to the commit:

gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments -X POST --input - <<'JSON'
{
  "body": "Fixed in [COMMIT_HASH](https://github.com/OWNER/REPO/commit/COMMIT_HASH)",
  "in_reply_to": COMMENT_ID
}
JSON

in_reply_to must be an integer (the databaseId from the script output).

4. Optional: summary comment

gh pr comment PR_NUMBER --body "Addressed all unresolved conversations:

1. **Topic** → [hash](https://github.com/OWNER/REPO/commit/hash)
2. **Topic** → [hash](https://github.com/OWNER/REPO/commit/hash)"

Quick reference

TaskCommand
Unresolved conversationsSKILL_BASE_DIR/scripts/pr-conversations.sh [PR]
All conversationsSKILL_BASE_DIR/scripts/pr-conversations.sh --all [PR]
View PRgh pr view
Add PR commentgh pr comment PR_NUMBER --body "..."
Reply to commentgh api repos/.../pulls/PR_NUMBER/comments -X POST with in_reply_to
Get repo owner/namegh repo view --json nameWithOwner -q .nameWithOwner

Commit hash format

  • Use a short hash (typically 8 chars, e.g. f16cfdae)
  • Link: https://github.com/OWNER/REPO/commit/HASH
  • Markdown: [f16cfdae](https://github.com/Unique-AG/ai/commit/f16cfdae)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Tabular and numerical data analysis with descriptive statistics and insights. Use when the user provides data, tables, CSVs, or numbers and wants analysis.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Financial factsheet analysis with key metrics extraction and investment rationale

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

ci-fix

免费

Diagnose and fix CI failures without leaving your editor.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Reproduce ai-repo PR checks locally with Poe and CI scripts, including per-package typecheck and coverage behavior. Use when validating changes before push or when user asks which local commands match CI.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Ask clarifying questions before implementing to ensure Python requirements are understood. Use when a task lacks detail, dependencies are unclear, or multiple interpretations are possible.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

查看 Unique-AG 的全部技能

报告此技能的问题