Pr Threads Resolve

posit-dev/skills/github/pr-threads-resolve

作者 posit-deve20b71b2ab527b7c480f4f60dcce2b18df1a99aeMIT收錄於 2026年10月9日更新於 2026年10月9日

Bulk resolve unresolved PR review threads on the current branch’s PR — typically after threads have been addressed manually or via /pr-threads-address

AI 產生的概覽

使用 gh CLI 批次解決目前分支 PR 上尚未解決的審查討論串。

功能
此技能提供一套工作流程,用來解決目前分支提取要求上尚未解決的審查討論串。它會先查詢 PR 編號與儲存庫識別碼,接著列出未解決的討論串及其檔案、行號與留言內容,要求確認或允許選擇性解決,解決已確認的討論串,並回報解決摘要。它依賴 gh CLI 與 gh-pr-review 擴充功能,並提供列出、解決及批次解決討論串的範例指令。
適用情境
當提取要求上的審查討論串已透過手動方式或相關流程處理完畢,現在需要將其標記為已解決時使用。它適合用來批次清理目前分支 PR 上尚未解決的審查討論串。
執行需求
需要 gh CLI 與 gh-pr-review 擴充功能(透過 gh extension install agynio/gh-pr-review 安裝)。需要連線至 GitHub 的網路存取。此技能未隨附指令碼,僅為說明文件。

Prerequisites

gh pr-review extension

Before using this command, check if the gh pr-review extension is installed:

bash
gh extension list | grep -q pr-review || gh extension install agynio/gh-pr-review

Resolve PR context first

Every gh pr-review subcommand requires both --pr <number> and --repo <owner/repo> — do not omit either. Look the values up once at the start of the workflow and substitute the literal numbers and slugs into every later command.

Get the PR number for the current branch:

bash
gh pr view --json number -q .number

Get the repository slug:

bash
gh repo view --json nameWithOwner -q .nameWithOwner

Then pass the resulting values directly — e.g. --pr 42 --repo posit-dev/skills — on every subsequent gh pr-review call in this workflow (list, resolve, view, reply).

Workflow

  1. Fetch and display all unresolved PR review threads
  2. Show thread details (file, line, comment text)
  3. Ask for confirmation or allow selective resolution
  4. Resolve the confirmed threads
  5. Report back with a summary of resolved threads

CLI Reference

List Review Threads

bash
gh pr-review threads list --pr <number> --repo <owner/repo>

Filter with --unresolved or --resolved.

Resolve / Unresolve Threads

bash
gh pr-review threads resolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>gh pr-review threads unresolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>

Bulk Resolve Example

Substitute the actual PR number and repo slug resolved in "Resolve PR context first" — the 42 / owner/repo below are placeholders.

bash
gh pr-review threads list --pr 42 --unresolved --repo owner/repo | \  jq -r '.threads[].id' | \  xargs -I {} gh pr-review threads resolve --thread-id {} --pr 42 --repo owner/repo

來源與署名

來源:posit-dev/skills位於github/pr-threads-resolve提交e20b71b

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架