AgentSkillsCN

update-pr-thread

回复评论线程,或更新 Azure DevOps 拉取请求上的评论状态。在修复评审发现后,可使用此方法,附上修复说明,并将相关线程标记为已解决(已修复)。

SKILL.md
--- frontmatter
name: update-pr-thread
description: >
  Reply to a comment thread and/or update its status on an Azure DevOps pull
  request. Use after fixing review findings to respond with a fix description
  and mark threads as resolved (fixed).

Update PR Thread

Platform Note

  • macOS/Linux: run .sh scripts
  • Windows: run .ps1 scripts with the same argument order

Run the update-pr-thread.sh script on macOS/Linux or update-pr-thread.ps1 on Windows to reply to and/or resolve a PR comment thread.

Arguments

#NameRequiredDescription
1organizationNoAzure DevOps organization (default: default_organization)
2projectYesProject name or ID
3repositoryIdYesRepository name or ID
4pullRequestIdYesPull request ID
5threadIdYesComment thread ID
6replyNoReply text (use - to skip and only update status)
7statusNoThread status: active, fixed, closed, byDesign, pending, wontFix

At least one of reply or status must be provided.

Examples

bash
# Reply and mark as fixed
bash .github/skills/update-pr-thread/update-pr-thread.sh default_organization MyProject MyRepo 42 7 "Fixed: refactored to use parameterized queries." fixed

# Reply only (keep thread active)
bash .github/skills/update-pr-thread/update-pr-thread.sh default_organization MyProject MyRepo 42 7 "Working on this, will push a fix shortly."

# Update status only (no reply)
bash .github/skills/update-pr-thread/update-pr-thread.sh default_organization MyProject MyRepo 42 7 - fixed
powershell
# Reply and mark as fixed (Windows)
.\github\skills\update-pr-thread\update-pr-thread.ps1 default_organization MyProject MyRepo 42 7 "Fixed: refactored to use parameterized queries." fixed

# Reply only (keep thread active) (Windows)
.\github\skills\update-pr-thread\update-pr-thread.ps1 default_organization MyProject MyRepo 42 7 "Working on this, will push a fix shortly."

# Update status only (no reply) (Windows)
.\github\skills\update-pr-thread\update-pr-thread.ps1 default_organization MyProject MyRepo 42 7 - fixed

Output

When a reply is posted, returns JSON with the created comment object. When status is updated, returns JSON with the updated thread object including id, status, and comments.