Fix Azure DevOps tag query for annotated tags using peelTags#148
Merged
Malcolmnixon merged 1 commit intofeature/azure-devopsfrom Apr 11, 2026
Merged
Conversation
…notated tags Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/82c58118-2d0c-4b28-91b1-d3255d9de7c6 Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Malcolmnixon
April 11, 2026 01:30
View session
14 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Azure DevOps tag queries fail for annotated tags because
objectIdpoints to the tag object, not the commit. The refs API needspeelTags=trueto return the resolved commit SHA inpeeledObjectId.Changes:
AzureDevOpsApiTypes.cs— Added nullablePeeledObjectIdtoAzureDevOpsRefand aCommitIdcomputed property that prefersPeeledObjectId(annotated) overObjectId(lightweight)AzureDevOpsRestClient.cs— Added&peelTags=trueto the refs endpoint queryAzureDevOpsRepoConnector.cs—BuildLookupDatanow usesCommitIdinstead ofObjectIdfor tag-to-commit mappingMockAzureDevOpsHttpMessageHandler.cs—MockAdoTagsupports optionalPeeledObjectIdAzureDevOpsRepoConnectorTests.cs— Added tests for annotated-only and mixed annotated/lightweight tag scenariosFallback behavior: When
PeeledObjectIdis null (lightweight tags),CommitIdreturnsObjectId— no behavior change for repos using only lightweight tags.Type of Change
Related Issues
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
Existing lightweight tag tests continue to pass unchanged — the
MockAdoTagthird parameter defaults tonull, so all existing call sites are unaffected.