Skip to content

fix: accept full ADO https:// URLs with sub-paths (closes #1128)#1254

Merged
danielmeppiel merged 4 commits into
mainfrom
fix/1128-ado-full-url-subpath
May 11, 2026
Merged

fix: accept full ADO https:// URLs with sub-paths (closes #1128)#1254
danielmeppiel merged 4 commits into
mainfrom
fix/1128-ado-full-url-subpath

Conversation

@sergio-sisternes-epam
Copy link
Copy Markdown
Collaborator

Fixes #1128

Problem

DependencyReference.parse() rejects full https://dev.azure.com/.../repo/subpath URLs 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/repo as virtual path before validating the base path structure.


Draft PR -- implementation in progress.

Sergio Sisternes and others added 2 commits May 10, 2026 20:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sergio-sisternes-epam sergio-sisternes-epam marked this pull request as ready for review May 10, 2026 22:32
@sergio-sisternes-epam sergio-sisternes-epam added the panel-review Trigger the apm-review-panel gh-aw workflow label May 10, 2026
Copilot AI review requested due to automatic review settings May 10, 2026 22:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.com URL 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.

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread tests/unit/test_ado_path_structure.py Outdated
@github-actions
Copy link
Copy Markdown

.

Generated by PR Review Panel for issue #1254 · ● 2.3M ·

@github-actions github-actions Bot removed the panel-review Trigger the apm-review-panel gh-aw workflow label May 10, 2026
Sergio Sisternes and others added 2 commits May 11, 2026 03:17
- Merge duplicate Fixed sections in CHANGELOG (keep-a-changelog)
- Correct PR reference (#1128 -> #1254) in changelog entry
- Add visualstudio.com parametrized test cases (issue #1128)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel merged commit 312613a into main May 11, 2026
9 checks passed
@danielmeppiel danielmeppiel deleted the fix/1128-ado-full-url-subpath branch May 11, 2026 05:19
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.

ADO: full https:// URL with sub-path rejected by parser (shorthand and object form work)

3 participants