AgentSkillsCN

accept-pr

通过代表已认证用户投出“批准”票,批准 Azure DevOps 拉取请求。在代码审查顺利完成、所有发现均已解决、PR 准备合并时,可选用此方法。

SKILL.md
--- frontmatter
name: accept-pr
description: >
  Approve (accept) an Azure DevOps pull request by casting an "Approve" vote
  on behalf of the authenticated user. Use after a successful code review
  when all findings are resolved and the PR is ready to merge.

Accept PR

Platform Note

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

Run the accept-pr.sh script on macOS/Linux or accept-pr.ps1 on Windows to approve a pull request.

Arguments

#NameRequiredDescription
1organizationNoAzure DevOps organization (default: default_organization)
2projectYesProject name or ID
3repositoryIdYesRepository name or ID
4pullRequestIdYesPull request ID

Examples

bash
# Approve PR 42
bash .github/skills/accept-pr/accept-pr.sh default_organization MyProject MyRepo 42
powershell
# Approve PR 42 (Windows)
.\github\skills\accept-pr\accept-pr.ps1 default_organization MyProject MyRepo 42

Output

Returns JSON with the reviewer vote object including id, vote, and displayName. A vote value of 10 means Approved.