Skip to content

Feat/azure devops pr - #555

Open
joshvito wants to merge 7 commits into
agavra:mainfrom
joshvito:feat/azure-devops-pr
Open

Feat/azure devops pr#555
joshvito wants to merge 7 commits into
agavra:mainfrom
joshvito:feat/azure-devops-pr

Conversation

@joshvito

@joshvito joshvito commented Aug 4, 2026

Copy link
Copy Markdown

I think this project is super cool. My day to day is tied to AzureDevops, so I had the robit help me extend this for AzureDevops. I compiled and tested/am using this from a local build. Figured I share with others.

Full caveat, I have no Rust experience before this and relied heavily on the robit to incrementally make the code work.

@joshvito
joshvito marked this pull request as draft August 4, 2026 17:23
@joshvito
joshvito marked this pull request as ready for review August 4, 2026 17:31

@agavra agavra left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I looked at all the non-azure related code and it LGTM! We just merged bitbucket support so we need to apply the merge conflicts. There's a lot bit they're quite simple.

I can't test the azure related stuff, so if it works for you then I'm happy with it.

I'll merge after that.

@joshvito

joshvito commented Aug 6, 2026

Copy link
Copy Markdown
Author

I'll take a look in the morning, thanks.

josh and others added 4 commits August 6, 2026 10:09
Review Azure DevOps Git PRs like GitHub PRs and GitLab MRs: open a PR,
read its diff, comment inline, pull down existing threads, and push the
review back.

- New src/forge/azure/ backend implementing ForgeBackend. Transport is
  pluggable: a Personal Access Token (AZURE_DEVOPS_EXT_PAT) drives the
  REST API directly over HTTPS (preferred - works with enterprise
  tenants where the Azure DevOps AAD app isn't provisioned), falling
  back to `az rest` (az login) when no PAT is set.
- Diffs come from the local clone (git diff base...head), since Azure
  exposes no unified-diff endpoint - mirrors GitLab's range-diff path.
- Fetches/renders existing comment threads (inline + PR-level), dropping
  Azure's system threads; submits inline comments as threads and maps
  Approve/Request-changes to reviewer votes (+10/-10).
- Wires ForgeKind::AzureDevOps through the backend factory, slug (az:),
  remote detection, PR-target parser chain, and --repo-url.
- Generalizes the PR-slug parser to accept multi-segment owners (Azure
  org/project; also fixes GitLab subgroups).
- Docs: docs/AZURE.md + README section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- spawn_pr_open resolves the local checkout before the background fetch
  thread, so opening an Azure PR from the Pull Requests tab can source
  its diff from the local clone (previously errored "needs a local
  clone").
- Fix connectionData: call it without api-version (Azure rejects 7.1 as
  "under preview"), unblocking the Approve/Request-changes reviewer vote.
- list_pull_requests honors the ReviewRequested scope via
  searchCriteria.reviewerId, so the all/requested toggle filters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rustfmt reflow of the Azure backend/models; no behavior change.
`cargo fmt --all --check` now passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshvito
joshvito force-pushed the feat/azure-devops-pr branch from 68f8778 to 1ec6bba Compare August 6, 2026 14:24
@joshvito

joshvito commented Aug 6, 2026

Copy link
Copy Markdown
Author

Rebased to main, resolved conflicts, and tested local build as working.

@joshvito
joshvito requested a review from agavra August 6, 2026 14:57
Comment thread src/forge/azure/az.rs Outdated
@joshvito
joshvito requested a review from jresnick3 August 7, 2026 15:16
@adrifer

adrifer commented Aug 7, 2026

Copy link
Copy Markdown

Wow big fan of Tuicr, but also big user of Azure DevOps, so I'm happy to give it a try as soon as is ready! Thanks a lot for the work here!

@joshvito

joshvito commented Aug 8, 2026

Copy link
Copy Markdown
Author

@agavra @jresnick3 Seems good to me. Found an unrelated bug while testing, and opened an issue/draft pr separate from this branch. Have a great weekend.

@joshvito

joshvito commented Aug 8, 2026

Copy link
Copy Markdown
Author

Wow big fan of Tuicr, but also big user of Azure DevOps, so I'm happy to give it a try as soon as is ready! Thanks a lot for the work here!

Feel free to pull the branch and build to give it a test whirl. Been using it all week. Have a great weekend.

@jresnick3

Copy link
Copy Markdown

I didn't do more than skim through the code but I've been using it for a few days and seems great so far!

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.

4 participants