fix: accept full ADO https:// URLs with sub-paths (closes #1128)#1254
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates DependencyReference.parse() to correctly accept Azure DevOps full https://... repository URLs that include additional sub-path segments after the repo name (treating those segments as the virtual package path), aligning behavior with the existing shorthand parsing logic.
Changes:
- Extend URL-path validation to extract ADO virtual sub-path segments from full HTTPS URLs and return them to the caller for virtual package handling.
- Update standard URL parsing to incorporate URL-embedded ADO virtual paths into
DependencyReference.is_virtual/virtual_path. - Add a parameterized unit test covering the 8-shape matrix for
dev.azure.comURL forms, and add a changelog entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/apm_cli/models/dependency/reference.py |
Extracts and validates ADO URL-embedded sub-path segments as a virtual path, and threads that through standard URL parsing. |
tests/unit/test_ado_path_structure.py |
Adds a parameterized test for the 8 ADO URL shapes (shorthand vs full HTTPS; base/ref/virtual combinations). |
CHANGELOG.md |
Adds an Unreleased changelog entry describing the ADO full-URL sub-path parsing fix. |
|
.
|
danielmeppiel
approved these changes
May 11, 2026
This was referenced May 11, 2026
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.
Fixes #1128
Problem
DependencyReference.parse()rejects fullhttps://dev.azure.com/.../repo/subpathURLs while shorthand and object forms work. The full-URL branch applies a strict 3-segment assertion before virtual-path detection.Approach
Align the full-URL ADO parser with the shorthand branch: extract segments after
_git/repoas virtual path before validating the base path structure.Draft PR -- implementation in progress.