Azure DevOps Support#153
Conversation
…ream 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>
…nts (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 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>
) 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>
…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>
…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>
…RLs (#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>
…port (#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>
…uments 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>
…ompatibility (#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>
…notated 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>
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>
… 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>
…e 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>
…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>
There was a problem hiding this comment.
Pull request overview
Adds first-class Azure DevOps support to BuildMark by introducing an Azure DevOps repo connector (REST-based), extending configuration parsing to understand Azure DevOps connector settings, and updating supporting utilities/tests/docs to match the new integration points.
Changes:
- Add
AzureDevOpsRepoConnector+ REST client + API types + work-item mapping to generate build notes from Azure DevOps repos. - Update process execution utilities to use
params string[]argument passing and Windowscmd /crouting for.cmd/.batsupport. - Expand configuration parsing (YamlDotNet) + documentation/requirements to cover the new
azure-devopsconnector.
Reviewed changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/DemaConsulting.BuildMark.Tests/Version/VersionTagTests.cs | Adds coverage for hierarchical tag prefixes (e.g., release/1.2.3). |
| test/DemaConsulting.BuildMark.Tests/Version/VersionIntervalSetTests.cs | Renames/clarifies a test name to match current behavior. |
| test/DemaConsulting.BuildMark.Tests/Utilities/UtilitiesTests.cs | Updates ProcessRunner tests to use tokenized argument arrays. |
| test/DemaConsulting.BuildMark.Tests/Utilities/ProcessRunnerTests.cs | Updates ProcessRunner tests for new params-based API and adds missing-command exception test. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorsTests.cs | Adds Azure DevOps connector tests and supporting mock wiring. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/RepoConnectorFactoryTests.cs | Validates factory creation/detection paths for Azure DevOps. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/GitHub/MockableGitHubRepoConnector.cs | Updates RunCommand override to match new params signature. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/MockAzureDevOpsHttpMessageHandler.cs | New: mock REST API handler and helper records for Azure DevOps tests. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/MockableAzureDevOpsRepoConnector.cs | New: test connector subclass overriding command + REST client creation. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnectorTests.cs | New: unit tests for Azure DevOps connector, URL parsing, mapper, and REST client. |
| test/DemaConsulting.BuildMark.Tests/IntegrationTests.cs | Adds Azure DevOps placeholder integration tests (Phase 2). |
| test/DemaConsulting.BuildMark.Tests/Configuration/ConfigurationTests.cs | Adds config-reader tests for Azure DevOps connector blocks and YAML errors. |
| test/DemaConsulting.BuildMark.Tests/Configuration/ConfigurationSubsystemTests.cs | Adds subsystem-level config parsing test for Azure DevOps connector settings. |
| test/DemaConsulting.BuildMark.Tests/BuildNotes/BuildInformationTests.cs | Fixes test name to match VersionCommitTag. |
| src/DemaConsulting.BuildMark/Version/VersionTag.cs | Extends tag parsing regex to allow / in prefixes. |
| src/DemaConsulting.BuildMark/Utilities/ProcessRunner.cs | Changes ProcessRunner API to params string[] + adds Windows cmd routing helper and improved missing-command exception. |
| src/DemaConsulting.BuildMark/RepoConnectors/RepoConnectorFactory.cs | Creates/detects Azure DevOps connector (explicit type, TF_BUILD, remote URL). |
| src/DemaConsulting.BuildMark/RepoConnectors/RepoConnectorBase.cs | Updates RunCommandAsync signature to params string[]. |
| src/DemaConsulting.BuildMark/RepoConnectors/GitHub/GitHubRepoConnector.cs | Updates git/gh command invocation to tokenized args. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/WorkItemMapper.cs | New: maps ADO work items to ItemInfo, including item-controls + custom fields. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRestClient.cs | New: REST client wrapper with pagination + WIQL + batch work item retrieval. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsRepoConnector.cs | New: Azure DevOps connector assembling BuildInformation from tags/commits/PRs/work items. |
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/AzureDevOpsApiTypes.cs | New: typed REST response models for Azure DevOps API. |
| src/DemaConsulting.BuildMark/DemaConsulting.BuildMark.csproj | Adds YamlDotNet dependency used by config parsing. |
| src/DemaConsulting.BuildMark/Configuration/BuildMarkConfigReader.cs | Reworks config parsing to use YamlDotNet representation model + adds Azure DevOps connector parsing. |
| src/DemaConsulting.BuildMark/Configuration/AzureDevOpsConnectorConfig.cs | Replaces placeholder with real ADO connector settings model. |
| requirements.yaml | Includes Azure DevOps connector requirements doc. |
| README.md | Documents Azure DevOps connector configuration + authentication. |
| docs/user_guide/introduction.md | Extends user guide with Azure DevOps usage/configuration/auth details. |
| docs/requirements_doc/introduction.md | Updates requirements doc scope to include Azure DevOps. |
| docs/reqstream/build-mark/version/version-interval.yaml | Updates referenced test name for interval behavior. |
| docs/reqstream/build-mark/version/version-commit-tag.yaml | Updates referenced test name for VersionCommitTag. |
| docs/reqstream/build-mark/repo-connectors/repo-connectors.yaml | Adds Azure DevOps subsystem requirement section + tests. |
| docs/reqstream/build-mark/repo-connectors/repo-connector-factory.yaml | Updates requirements for Azure DevOps detection + config forwarding. |
| docs/reqstream/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.yaml | New: requirements for Azure DevOps connector subsystem. |
| docs/reqstream/build-mark/configuration/configuration.yaml | Adds Azure DevOps connector config requirements + tests. |
| docs/reqstream/build-mark/build-notes/build-information.yaml | Adds requirements for routed section rendering behavior. |
| docs/reqstream/build-mark/build-mark.yaml | Adds system-level requirements for Azure DevOps integration (placeholder integration tests). |
| docs/design/introduction.md | Updates design overview to include Azure DevOps subsystem. |
| docs/design/build-mark/version/version-tag.md | Documents path-prefix tags as supported inputs. |
| docs/design/build-mark/utilities/utilities.md | Updates ProcessRunner API docs (params args). |
| docs/design/build-mark/utilities/process-runner.md | Documents cmd routing + ArgumentList usage. |
| docs/design/build-mark/repo-connectors/repo-connectors.md | Updates subsystem descriptions to include Azure DevOps. |
| docs/design/build-mark/repo-connectors/repo-connector-factory.md | Updates factory behavior documentation for Azure DevOps selection/detection. |
| docs/design/build-mark/repo-connectors/repo-connector-base.md | Updates RunCommandAsync signature documentation. |
| docs/design/build-mark/repo-connectors/github/github-repo-connector.md | Updates GitHub connector behavior documentation. |
| docs/design/build-mark/repo-connectors/azure-devops/work-item-mapper.md | New: design doc for WorkItemMapper behavior and precedence rules. |
| docs/design/build-mark/repo-connectors/azure-devops/azure-devops.md | New: design overview of Azure DevOps subsystem units/interactions. |
| docs/design/build-mark/repo-connectors/azure-devops/azure-devops-rest-client.md | New: design doc for AzureDevOpsRestClient endpoints + behavior. |
| docs/design/build-mark/repo-connectors/azure-devops/azure-devops-repo-connector.md | New: design doc for AzureDevOpsRepoConnector end-to-end behavior. |
| docs/design/build-mark/repo-connectors/azure-devops/azure-devops-api-types.md | New: design doc for Azure DevOps API type models. |
| docs/design/build-mark/program.md | Documentation updates for program entrypoint behavior text. |
| docs/design/build-mark/configuration/configuration.md | Documents YamlDotNet-based parsing + Azure DevOps connector config model. |
| docs/design/build-mark/build-notes/build-information.md | Documents routed sections behavior in markdown output. |
| docs/design/build-mark/build-mark.md | Updates system architecture documentation for Azure DevOps support. |
| .reviewmark.yaml | Adds a ReviewMark set for Azure DevOps subsystem artifacts. |
| .cspell.yaml | Adds Azure DevOps-related words to spelling dictionary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Get work items linked to this PR | ||
| var workItemRefs = await restClient.GetPullRequestWorkItemsAsync( | ||
| lookupData.Project, pr.PullRequestId); | ||
|
|
There was a problem hiding this comment.
CollectChangesFromPullRequestsAsync is calling GetPullRequestWorkItemsAsync with lookupData.Project as the repository identifier. That will generate URLs like .../git/repositories/{project}/pullrequests/... and should instead use the repository id/name for the current repo. Consider adding repository (or repositoryId) to LookupData and passing that value here.
| private static string BuildPullRequestUrl(string organizationUrl, string project, int pullRequestId) | ||
| { | ||
| return $"{organizationUrl}/{project}/_git/pullrequest/{pullRequestId}"; | ||
| } |
There was a problem hiding this comment.
BuildPullRequestUrl is missing the repository segment in the Azure DevOps web URL (the usual format is .../{project}/_git/{repo}/pullrequest/{id}). As written, the generated hyperlinks are likely broken when pr.Url is null, and using pr.Url may also point at a REST API URL rather than the web UI. Build the PR link using org+project+repository (or consume the web link field) so markdown output reliably links to the PR page.
| // Honor explicit connector selection when configuration is available. | ||
| if (config?.Type != null && | ||
| config.Type.Equals("azure-devops", StringComparison.OrdinalIgnoreCase)) | ||
| { | ||
| throw new NotSupportedException("Azure DevOps connector support is not yet implemented."); | ||
| return new AzureDevOpsRepoConnector(config.AzureDevOps); | ||
| } | ||
|
|
||
| // Check for Azure DevOps Pipelines environment variable | ||
| if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TF_BUILD"))) | ||
| { | ||
| return new AzureDevOpsRepoConnector(config?.AzureDevOps); | ||
| } | ||
|
|
||
| // Check for GitHub Actions environment variables | ||
| if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS")) || | ||
| !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"))) | ||
| { | ||
| return new GitHubRepoConnector(config?.GitHub); | ||
| } |
There was a problem hiding this comment.
RepoConnectorFactory.Create currently only honors an explicit config.Type when it is "azure-devops"; an explicit "github" type can still be overridden by TF_BUILD / remote-url detection. This makes it impossible to force GitHub behavior in Azure Pipelines or mixed environments. Update the factory to honor explicit connector selection for all supported types (and only fall back to auto-detection when config.Type is null/empty).
| // ───────────────────────────────────────────────────────────────────────── | ||
| // BuildMark-RepoConnectors-AzureDevOps | ||
| // ───────────────────────────────────────────────────────────────────────── | ||
|
|
||
| /// <summary> | ||
| /// Test that the Azure DevOps connector implements the IRepoConnector interface. | ||
| /// </summary> | ||
| [TestMethod] | ||
| public void RepoConnectors_AzureDevOps_ImplementsInterface_ReturnsTrue() | ||
| { |
There was a problem hiding this comment.
This file still contains ProcessRunner.TryRunAsync/RunAsync test calls that pass arguments as a single string (and in one case pass an extra empty-string argument). ProcessRunner now takes params string[] arguments, so these calls will no longer compile and should be updated to pass argument tokens as a string array (and drop the unnecessary empty argument).
Pull Request
Description
This PR adds Azure DevOps support.
Type of Change
Related Issues
Closes #97
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration Releasedotnet run --project src/DemaConsulting.BuildMark --configuration Release --framework net10.0--no-build -- --validateCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
./lint.sh(Unix/macOS) orcmd /c lint.bat/./lint.bat(Windows)Testing
Documentation
Additional Notes
Manually tested on Azure DevOps projects.