Repository navigation
Match Azure exclusions against decoded repository URLs - #573
Merged
mickgmdb merged 1 commit intoNov 5, 2026
Merged
Conversation
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
--azure-excludenever matches an Azure DevOps repository whose project or repository name contains a space or another character that needs URL encoding. The Azure API returnsremoteUrlpercent-encoded, for examplehttps://dev.azure.com/org/My%20Project/_git/My%20Repo.parse_repo_identifier_from_urlkeeps the encoded segments, so the repository identifier becomesorg/my%20project/my%20repo. An exclusion written as documented,org/My Project/My Repo, normalizes toorg/my project/my repo, so the repository is still scanned.This change percent-decodes the URL path segments before building the identifier. Exclusions given as plain names, globs, or full remote URLs now all match. Names without encoded characters produce the same identifiers as before.
Fixes #572
Test plan
azure::tests::exclude_matcher_matches_percent_encoded_remote_urlscovers an exact exclusion, a glob, and the full remote URL. Without the change it fails on the exact-exclusion assertion.cargo test -p kingfisher-bin --lib -- azure::(25 passed)cargo clippy -p kingfisher-bin --lib --tests -- -D warningscargo fmt --check