Skip to content

Add Azure DevOps connector support#140

Merged
Malcolmnixon merged 6 commits intofeature/azure-devopsfrom
copilot/add-azure-devops-support
Apr 10, 2026
Merged

Add Azure DevOps connector support#140
Malcolmnixon merged 6 commits intofeature/azure-devopsfrom
copilot/add-azure-devops-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Phase 1: Configuration & Factory - Update AzureDevOpsConnectorConfig with full properties; update RepoConnectorFactory to detect and create Azure DevOps connectors
  • Phase 2: API Types - Implement AzureDevOpsApiTypes.cs with record types for REST API responses
  • Phase 3: REST Client - Implement AzureDevOpsRestClient.cs with paginated REST API methods and authentication
  • Phase 4: Work Item Mapper - Implement WorkItemMapper.cs for type normalization, state filtering, and item controls extraction
  • Phase 5: Main Connector - Implement AzureDevOpsRepoConnector.cs with full GetBuildInformationAsync logic
  • Phase 5.1: Factory tests - Updated factory tests and requirements
  • Phase 6: Mock HTTP Handler - Create MockAzureDevOpsHttpMessageHandler for REST API mocking in tests
  • Phase 7: Mockable Connector - Create MockableAzureDevOpsRepoConnector for command mocking in tests
  • Phase 8: Unit Tests - Replace all placeholder tests with real implementations covering all requirements
  • Phase 9: Build & Test Verification - Zero warnings build, 443 tests passing on all 3 frameworks
  • Phase 10: Code Review - Addressed all 4 review comments; CodeQL clean (0 alerts)
  • Phase 11: Lint Fixes - Fixed all cspell lint errors (added pullrequest, hostnames, myproject, myrepo to dictionary)

Copilot AI and others added 5 commits April 10, 2026 16:09
…vOpsRestClient, WorkItemMapper, AzureDevOpsRepoConnector; update AzureDevOpsConnectorConfig and RepoConnectorFactory

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…all requirements

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…FieldValue, enhance XML docs

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Looks like some linting problems were introduced - run lint and fix the reported issues.

… to dictionary

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/87c3f4ec-23eb-40db-944b-5bfe18c5e317

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot Looks like some linting problems were introduced - run lint and fix the reported issues.

Fixed in d630873. The cspell linter flagged 4 unknown words (pullrequest, hostnames, myproject, myrepo) introduced in the new source and test files. Added them to .cspell.yaml. Full lint now passes clean.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Debug/net10.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Debug/net10.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Debug/net10.0/testhost.dll --port 46503 --endpoint 127.0.0.1:046503 --role client --parentprocessid 5315 --telemetryoptedin false (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from Malcolmnixon April 10, 2026 16:35
@Malcolmnixon Malcolmnixon merged commit c85a54a into feature/azure-devops Apr 10, 2026
15 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-azure-devops-support branch April 10, 2026 16:56
Malcolmnixon added a commit that referenced this pull request Apr 11, 2026
* docs: Add Azure DevOps connector documentation and system-level reqstream requirements (issue #97 phase 1) (#138)

* test: verify push credentials are working

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/c0bbf32e-2b35-4441-bf47-7bcb318236d0

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* docs: add Azure DevOps connector documentation

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/c0bbf32e-2b35-4441-bf47-7bcb318236d0

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* feat: add Azure DevOps reqstream requirements across all levels

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/2babef18-d885-44c3-9a27-f51234eaba9c

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* refactor: scope reqstream to system-level only; add integration test placeholders

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/49054f70-edf9-4a8c-90a4-cfb7923fa3ba

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* feat: Azure DevOps subsystem/unit design docs and reqstream requirements (issue #97 step 2) (#139)

* docs: Add Azure DevOps subsystem design documentation and reqstream requirements (issue #97 phase 2)

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* chore: Add Azure DevOps technical terms to cspell and review-set to reviewmark (issue #97)

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* docs: document System.Text.Json deserialization approach in ADO design docs

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/46f63b87-1eb9-404d-853f-82c0ce2e72e4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update docs/design/build-mark/repo-connectors/azure-devops/azure-devops-api-types.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolm Nixon <Malcolm.nixon@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add Azure DevOps connector support (#140)

* Add Azure DevOps connector source files: AzureDevOpsApiTypes, AzureDevOpsRestClient, WorkItemMapper, AzureDevOpsRepoConnector; update AzureDevOpsConnectorConfig and RepoConnectorFactory

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update factory tests and requirements for Azure DevOps connector support

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Add mock HTTP handler and mockable connector for Azure DevOps tests

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Replace placeholder Azure DevOps tests with real implementations for all requirements

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Address code review feedback: add StringComparer.Ordinal, improve GetFieldValue, enhance XML docs

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/d7fce770-ec19-4f5a-baf0-c10d60b502d4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix cspell lint errors: add pullrequest, hostnames, myproject, myrepo to dictionary

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/87c3f4ec-23eb-40db-944b-5bfe18c5e317

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix 5 minor documentation inaccuracies in Azure DevOps design docs (#141)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/b39579d7-9e6c-4156-be7e-09e761002bae

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Switch BuildMarkConfigReader to YamlDotNet; add Azure DevOps example to user guide (#142)

* Switch BuildMarkConfigReader to use YamlDotNet for YAML parsing

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/78f18ecb-04a5-431f-a214-9ead77a0b459

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update design docs for YamlDotNet and add Azure DevOps example to user guide

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/78f18ecb-04a5-431f-a214-9ead77a0b459

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Address code review feedback: defensive line guard and tab error assertion

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/78f18ecb-04a5-431f-a214-9ead77a0b459

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Implement ParseAzureDevOpsConnector placeholder and add requirements traceability (#143)

* Implement ParseAzureDevOpsConnector and add unit tests

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/c200ab4d-a9b9-4a6c-8eca-7c5f58859e82

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Add AzureDevOpsConnectorConfig requirement and subsystem test

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/c200ab4d-a9b9-4a6c-8eca-7c5f58859e82

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Normalize Azure DevOps YAML key from organization-url to url; update docs

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/bc2d0ade-b7f6-4459-9684-8d83ca3919cf

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Add myorg to cspell dictionary to fix lint failure

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/827c5337-14d6-48bf-ab7d-0738d2e64c82

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix XML doc comment placement on GetOptionalScalarValue and ParseAzureDevOpsConnector

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/9e3fe1ec-7259-47c4-a36f-874bce583268

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolm Nixon <Malcolm.nixon@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Refactor ParseAzureDevOpsUrl to support on-prem Azure DevOps Server URLs (#144)

* Refactor ParseAzureDevOpsUrl to use unified _git segment pattern for cloud and on-prem support

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/7ef35462-800c-4ee6-a43e-9599615a27da

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Remove unnecessary ToArray() allocation in org URL construction

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/7ef35462-800c-4ee6-a43e-9599615a27da

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix ProcessRunner Win32Exception handling and Windows .cmd script support (#145)

* Fix ProcessRunner Win32Exception and Windows .cmd script support

On Windows, route commands through cmd /c so .cmd/.bat scripts (like az CLI) are
resolved correctly. Also catch Win32Exception from process.Start() and wrap it as
InvalidOperationException with a descriptive message identifying the missing command.

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/f96b044e-80e3-408e-a600-18b5971a50ab

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix CreateStartInfo to skip cmd wrapping for empty/null commands

On Windows, cmd /c with an empty command is treated as a no-op (exit 0),
which caused TryRunAsync_WithException_ReturnsNull to return empty string
instead of null. Skip the cmd /c wrapping when command is empty/whitespace
so the original error behavior is preserved.

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/0e5657e0-fd69-420e-bee6-3a02e0b8aa16

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Refactor ProcessRunner and RunCommandAsync to use params string[] arguments with ArgumentList (#146)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/4c67357a-43ec-4244-902a-76f7240fa1a4

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Downgrade Azure DevOps REST API version from 7.1 to 6.0 for broader compatibility (#147)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/545df582-1d78-48a1-b5c5-9559b159296e

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* fix: add peelTags=true to ADO tag query and use peeledObjectId for annotated tags (#148)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/82c58118-2d0c-4b28-91b1-d3255d9de7c6

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Allow path separators in VersionTag prefix for hierarchical tags (#149)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/77cef92f-e0a8-40e0-90e2-59a407f1505d

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix ADO PR mapping: use lastMergeCommit nested object instead of flat mergeCommitId (#150)

The Azure DevOps GitPullRequest API returns lastMergeCommit as a nested
GitCommitRef object (with commitId), not as a flat mergeCommitId string.
The previous code deserialized a non-existent mergeCommitId field, which
always returned null from real API calls, breaking commit-to-PR mapping
for all merge strategies (including squash merges).

- Add AzureDevOpsGitCommitRef record to model the nested commit reference
- Change AzureDevOpsPullRequest to deserialize LastMergeCommit (nested object)
- Add convenience MergeCommitId property to minimize downstream changes
- Update mock handler to emit lastMergeCommit: { commitId: ... } format

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/18090e6e-03fe-4772-8b1e-8e8c33c87fdb

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix JsonException deserializing string-valued work item IDs from Azure DevOps API (#151)

* Fix GetPullRequestWorkItemsAsync JsonException when id is returned as string

Add NumberHandling = JsonNumberHandling.AllowReadingFromString to JsonOptions
so that string-encoded numeric values (e.g. "id":"1234") from the Azure DevOps
REST API are correctly deserialized to int properties.

Update mock handler to emit string-valued IDs matching real API behavior.

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/dd884f58-ed49-4127-8301-652e385cf287

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Add test cases for string-valued work item ID deserialization

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/dd884f58-ed49-4127-8301-652e385cf287

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update design documentation and fix review findings for Azure DevOps support (#152)

* Update build-mark.md system design for Azure DevOps support

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/70d126bb-3ade-4d1e-a58d-4fdebfac62a4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update Azure DevOps design docs for bug-fix changes (API types, REST client, connector)

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/70d126bb-3ade-4d1e-a58d-4fdebfac62a4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Update remaining design docs for ProcessRunner, RepoConnectors, Configuration changes

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/70d126bb-3ade-4d1e-a58d-4fdebfac62a4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix markdown linting issues in design docs

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/70d126bb-3ade-4d1e-a58d-4fdebfac62a4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix formal review findings: REST client pagination docs, factory auto-detection order, and ADO subsystem tests

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/70d126bb-3ade-4d1e-a58d-4fdebfac62a4

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

* Fix 19 formal review findings: doc accuracy, test naming, and missing requirements

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/0d0fe9c3-4988-41f5-b650-d59f32d5e748

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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