fix: support spaces in Azure DevOps project names#92
Merged
danielmeppiel merged 3 commits intomicrosoft:mainfrom Feb 24, 2026
Merged
fix: support spaces in Azure DevOps project names#92danielmeppiel merged 3 commits intomicrosoft:mainfrom
danielmeppiel merged 3 commits intomicrosoft:mainfrom
Conversation
ADO project names may contain spaces (e.g., "Americas Praxair tfs"). Previously, `apm install` rejected these with "not accessible or doesn't exist" because the character-validation regexes only allowed `[a-zA-Z0-9._-]`. Changes: - Decode percent-encoded input (`%20`) early in DependencyReference.parse() - Allow spaces in ADO path-component validation regexes - URL-encode the project segment when building HTTPS clone, SSH, and REST API URLs via build_ado_* helpers and to_github_url() All three input forms now work: apm install dev.azure.com/org/My%20Project/repo apm install dev.azure.com/org/My Project/repo apm install dev.azure.com/org/My%20Project/_git/repo Fixes microsoft#89 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test parsing with %20-encoded and literal spaces in project names - Test to_github_url() produces properly encoded ADO URLs - Test that spaces are still rejected in GitHub owner/repo names - Test build_ado_https_clone_url, build_ado_ssh_url, build_ado_api_url with spaces
Collaborator
|
@ryanfk thank you for spotting this and submitting the PR! I added unit tests covering the missing cases:
|
Collaborator
|
LGTM |
SebastienDegodez
approved these changes
Feb 24, 2026
|
@microsoft-github-policy-service rerun |
|
@ryanfk please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Summary
America Oh Yeah), butapm installrejected them with "not accessible or doesn't exist"DependencyReference.parse()only allowed[a-zA-Z0-9._-], blocking spaces and%20-encoded inputbuild_ado_https_clone_url,build_ado_ssh_url,build_ado_api_url) interpolated project names directly without percent-encodingChanges
src/apm_cli/models/apm_package.py:%20→ space) early inparse()to_github_url()src/apm_cli/utils/github_host.py:projectparameter inbuild_ado_https_clone_url(),build_ado_ssh_url(), andbuild_ado_api_url()All three input forms now work
apm install dev.azure.com/org/My%20Project/repo apm install "dev.azure.com/org/My Project/repo" apm install dev.azure.com/org/My%20Project/_git/repoTest plan
%20, literal spaces, and_gitsegmentFixes #89
🤖 Generated with Claude Code