← ClaudeAtlas

ado-pr-merge-via-apilisted

Completa merges de Pull Request en Azure DevOps por REST API cuando la UI no sirve o hay que scriptear en lote. Cubre los 403 por threads sin resolver, voto en 'waiting for author' y CI gate rancio.
CarlosCaPe/octorato · ★ 15 · API & Backend · score 73
Install: claude install-skill CarlosCaPe/octorato
# ADO Pull Request Merge via REST API Workflow for completing a PR on Azure DevOps via the REST API instead of the web UI. Covers the three common 403s and how to clear each. ## When to use - Scripting PR completion as part of a delivery pipeline. - The UI is slow / sessions are flaky / SSO loop. - Bulk-merging multiple ready PRs. - An agent acting on behalf of the operator with an ADO PAT. ## What this skill does NOT do Does not bypass content review. The operator is expected to have already done the review (or approved the changes consciously). This is a procedural workflow for the *merge action* — not for replacing human judgment on the diff. ## The core sequence (happy path) ```text 1. GET /git/repositories/{repoId}/pullRequests/{prId} → confirm mergeStatus="succeeded" and lastMergeSourceCommit.commitId 2. PUT /git/repositories/{repoId}/pullRequests/{prId}/reviewers/{userId} → body { vote: 10, id: userId } (10 = approved) 3. PATCH /git/repositories/{repoId}/pullRequests/{prId}/threads/{threadId} → body { status: "fixed" | "closed" } for each open thread you own 4. PATCH /git/repositories/{repoId}/pullRequests/{prId} → body { status: "completed", lastMergeSourceCommit: { commitId: <from step 1> }, completionOptions: { mergeStrategy: "noFastForward", // or "squash" / "rebase" deleteSourceBranch: false, bypassPolicy: false, } } → on 200: completion succeeded; new commit at lastMe