Skip to content

Add Azure DevOps Services support to respond-to-pr-comments#253

Closed
abeltrano wants to merge 2 commits intomainfrom
feat/respond-to-pr-comments-ado-support
Closed

Add Azure DevOps Services support to respond-to-pr-comments#253
abeltrano wants to merge 2 commits intomainfrom
feat/respond-to-pr-comments-ado-support

Conversation

@abeltrano
Copy link
Copy Markdown
Collaborator

Extends the respond-to-pr-comments template, skill, and format to handle Azure DevOps Services pull requests alongside GitHub. The workflow shape is shared and only the API recipes branch per platform; users do not need to pass a new parameter or pick a platform.

What's new

  • Auto-detect platform from the PR URL (github.com vs dev.azure.com / *.visualstudio.com), with fallback to git remote -v (handles SSH remotes including git@ssh.dev.azure.com:v3/... and {org}@vs-ssh.visualstudio.com:v3/...). Prompts on ambiguity — does not guess.
  • ADO auth via az login + az rest --resource <ADO GUID> on every call. No Personal Access Token path.
  • Native status vocabulary preserved — no cross-platform normalization. ADO uses fixed (not resolved) per the official CommentThreadStatus REST enum.
  • ADO reply payload uses content + parentCommentId + commentType: "text". parentCommentId is always set, including for PR-wide threads (reply to the latest text comment).
  • System threads are filtered (commentType: "system" or system CodeReviewThreadType properties); threads with no text comments are flagged for the user, not auto-skipped.
  • Conservative outdated detection — prefer the ADO iterations + items APIs; fall back to the local working tree only when HEAD matches the iteration's source-branch tip; otherwise mark "unknown / not verified" and ask. PR-wide threads (null threadContext) skip outdated detection.
  • GitHub recipe paginates both outer reviewThreads and inner comments via follow-up cursored queries.
  • Out of scope, fail fast: ADO Server / on-prem / TFS / custom hostnames stop with a clear message rather than attempting unsupported API calls.

Files changed

  • templates/respond-to-pr-comments.md — added Phase 1 platform detection and per-platform branches in Phase 2 (gather) and Phase 5 (apply); ADO edge cases in Phase 6; expanded Quality Checklist.
  • .github/skills/respond-to-pr-comments/SKILL.md — mirrors the template with compact per-platform recipes side-by-side.
  • formats/pr-comment-responses.md — generalized status tables and the Action Summary to use platform-native vocabulary.
  • manifest.yaml — updated entry description to mention ADO Services.

Validation

  • python tests/validate-manifest.py passes (manifest ↔ template protocol sync unchanged).
  • Two rubber-duck critique passes were applied; ADO REST shape verified against MS Learn docs (CommentThreadStatus, threads/comments endpoints, payload field names).

Extends the respond-to-pr-comments template, skill, and format to

handle Azure DevOps Services PRs alongside GitHub. Platform is

auto-detected from the PR URL (with git-remote fallback); the

workflow shape is shared and only API recipes branch per platform.

- Auto-detect platform from PR URL or git remote (handles SSH and

  legacy visualstudio.com hosts); prompt on ambiguity, do not guess.

- ADO auth uses 'az login' + 'az rest --resource <ADO GUID>' on

  every call; no Personal Access Token path.

- Preserve each platform's native status vocabulary in output (no

  cross-platform normalization). ADO uses 'fixed' (not 'resolved')

  per the CommentThreadStatus REST enum.

- ADO reply payload uses content + parentCommentId + commentType

  ('text'); always set parentCommentId, including for PR-wide threads.

- Filter ADO system threads (commentType 'system' or system

  CodeReviewThreadType properties); flag, do not auto-skip, threads

  with no text comments.

- Conservative outdated detection: prefer ADO iteration/items API,

  fall back to local working tree only when HEAD matches the

  iteration's source-branch tip; otherwise mark unverified.

- GitHub recipe paginates both reviewThreads and inner comments via

  follow-up cursored queries.

- ADO Server / on-prem / TFS / custom hostnames are out of scope —

  stop with a clear message.

- Update format file with per-platform status tables and add

  byDesign to the closed-state action summary.

- Update manifest description to mention ADO Services.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 18:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Extends the respond-to-pr-comments workflow/template ecosystem to support Azure DevOps Services PRs alongside GitHub by adding platform detection, ADO-specific API recipes (auth via az rest), and platform-native status vocabulary throughout.

Changes:

  • Added a new “detect platform + resolve coordinates” phase and branched gather/apply steps for GitHub vs Azure DevOps Services.
  • Updated the shared output format to use platform-native thread status vocabulary (GitHub pending/outdated/resolved; ADO active/pending/fixed/... + “potentially outdated”).
  • Updated the skill doc and manifest description to reflect the new ADO Services support.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
templates/respond-to-pr-comments.md Adds platform detection and ADO Services branches for gather/apply/status update workflows.
.github/skills/respond-to-pr-comments/SKILL.md Mirrors the template with compact GitHub vs ADO recipes and constraints.
formats/pr-comment-responses.md Generalizes the reporting format and status tables for GitHub vs ADO.
manifest.yaml Updates the template description to mention ADO Services and platform autodetection.

Comment thread templates/respond-to-pr-comments.md Outdated
Comment thread .github/skills/respond-to-pr-comments/SKILL.md Outdated
Comment thread templates/respond-to-pr-comments.md Outdated
Comment thread .github/skills/respond-to-pr-comments/SKILL.md Outdated
- ADO reply POST switched to temp-file pattern (--body @reply.json)

  to handle apostrophes/newlines/backslashes in real reply text;

  mirrors the GitHub recipe.

- pr_reference param doc clarified: URL auto-detect with git-remote

  fallback and ambiguity prompt (covers #42 / !123 inputs).

- All shell command fences in SKILL labeled bash for clarity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@abeltrano abeltrano requested a review from Alan-Jowett May 4, 2026 19:07
@abeltrano abeltrano changed the title feat(respond-to-pr-comments): add Azure DevOps Services support Add Azure DevOps Services support to respond-to-pr-comments May 4, 2026
@abeltrano
Copy link
Copy Markdown
Collaborator Author

Superseded by #254, which contains all commits from this branch plus the human-voice-fidelity protocol on top. The merge-after dependency in #254's description is being removed; #254 now stands alone against main.

@abeltrano abeltrano closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants