Skip to content

feat(bridge): add Azure DevOps (Azure Boards) bridge - #1590

Open
timpara wants to merge 1 commit into
git-bug:trunkfrom
timpara:feat/ado-bridge
Open

timpara wants to merge 1 commit into
git-bug:trunkfrom
timpara:feat/ado-bridge

Conversation

@timpara

@timpara timpara commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Bidirectional bridge between git-bug and Azure DevOps Boards work items, requested in #1542. Authentication is via Personal Access Token (PAT). The REST client is hand-rolled on net/http with no new dependencies.

Per @sudoforge's note on #1542: I will maintain this in-tree until the external plugin interface lands, and I take responsibility for issues related to it.

Opening as a draft for early feedback on the three scoping questions I raised on #1542 (target name, client approach, single vs. split PR).

Changes

New bridge/ado/ package, registered in bridge/bridges.go:

  • ado.go: BridgeImpl, metadata/config constants, PAT client builder
  • client.go: REST client for WIQL, get/create/update/delete work items, updates (revisions), and comments
  • config.go: Configure() PAT flow (interactive and non-interactive)
  • import.go: incremental WIQL on System.ChangedDate, mapping work items, comments, state, tags and description edits to bug operations, with a final-status reconcile for items created directly in a closed state
  • export.go: create and update work items via JSON Patch, replaying comments, status, title and label changes
  • mapping.go: pure helpers (WIQL builder, state/tag mapping, identity parsing)

One bridge per Azure DevOps project, matching the Jira bridge model. Config keys beyond base-url/organization/project/login are optional: create-work-item-type (default Task), closed-states, open-state-target, closed-state-target.

Test plan

  • go test ./bridge/ado/: 23 unit tests (mapping logic + net/http client via httptest)
  • go vet and gofmt clean; go.mod / go.sum unchanged
  • Live-tested end to end against a real Azure DevOps organization:
    • Import: auth, WIQL incremental query, field/identity/tag/comment/revision parsing, importer to git-bug bugs, closed-item replay, and idempotency (a second pass is a no-op)
    • Export: create work item, comment, close and label, then verified on the remote
  • Live integration tests are gated behind ADO_TEST (read-only) and ADO_TEST_EXPORT (writes), matching the github/gitlab bridge convention, so they skip in CI.

Known follow-ups

  • PAT-only auth for now; OAuth can follow.
  • Project-scoped; area-path or team scoping could come later.
  • A doc/azuredevops_bridge.md page once the scoping questions are settled.

Add a bidirectional bridge between git-bug and Azure DevOps Boards work
items, authenticated with a Personal Access Token. The REST client is
built on net/http with no new dependencies.

- import: incremental WIQL query on System.ChangedDate, mapping work
  items, comments, state, tags and description edits to bug operations,
  with a final-status reconcile for items created directly in a closed
  state
- export: create and update work items via JSON Patch, replaying
  comments, status, title and label changes
- metadata-based idempotency and export-echo suppression
- PAT auth stored through the existing credential keyring
- unit tests for the mapping logic and REST client, plus live
  integration tests gated behind ADO_TEST / ADO_TEST_EXPORT

Refs git-bug#1542
@timpara
timpara marked this pull request as ready for review September 2, 2026 13:12

This branch has not been deployed

No deployments
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.

1 participant