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 <[email protected]>
- 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:
|
Contributor
|
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”),
|
danielmeppiel
added a commit
that referenced
this pull request
Apr 30, 2026
…#1073) * docs(notice): rename NOTICE.md -> NOTICE; add CLA third-party section Two changes, one file rename: 1. Rename NOTICE.md -> NOTICE, matching the Apache / CNCF convention used by upstream third-party-attribution files (kubernetes-sigs/kro, kubernetes-sigs/headlamp, etc.). The .md extension was non-idiomatic for a generated legal artifact -- NOTICE files are read by tooling (license scanners, SBOM generators) that match on the bare filename. Generator (scripts/generate-notice.py), Makefile target, and the NOTICE Drift Check workflow are all updated to operate on the extension-less path. 2. Add a 'Submitted on behalf of a third-party' section to NOTICE, crediting five contributors whose pull requests landed before the microsoft-github-policy-service CLA bot recorded a signature on file. The repo transferred from danielmeppiel/awd-cli to the microsoft org; some early PRs predate CLA enforcement, and we could not retroactively reach all contributors. Mirrors section 7 of common CLA texts (the wording adopted by CNCF NOTICE files). Driven by a new _third_party_submissions block in scripts/notice-metadata.yaml -- legally-significant wording stays alongside the per-component data, not buried in code. Contributors named (verified via Check Runs API against the microsoft-github-policy-service app, license/cla check on every merged PR by each suspected author): - @pofallon (PR #4) - @richgo (PRs #8, #25, #26, #33, #34) - @ryanfk (PR #92 -- bot ran with conclusion=null, output: 'Contributor License Agreement is not agreed yet.') - @foutoucour (PR #108) - @Jah-yee (PR #184) Listed contributors who later sign the CLA (or who were signed under a different GitHub account at the time) can request removal via issue. Co-authored-by: Copilot <[email protected]> * docs(notice): trim third-party section preamble Strip the historical/CNCF-citation paragraph and the verbatim CLA-section-7 quote. Keep only the active sentence (what the listing means + how to request removal). Co-authored-by: Copilot <[email protected]> * docs(notice): address PR #1073 review Three fixes from copilot-pull-request-reviewer: 1. Drop spurious leading '---' separator in the third-party-submissions renderer. render_component already ends each component with '---\n\n', so prepending another '---' produced two consecutive separators in NOTICE. Verified: separator count dropped from 17 to 16. 2. Sweep stale 'NOTICE.md' references in scripts/generate-notice.py (top-level docstring, Modes section, ComponentMeta and DepSpec field docstrings). The constant was renamed; the docs lagged. 3. Append (#1073) PR refs to both CHANGELOG entries; ASCII-correct the arrow ('->' instead of '->'). Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
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