fix(azure): pass --project and --repository so PR creation works with SSH remotes - #173
Merged
Merged
Conversation
… SSH remotes
`az repos pr create` only auto-detects the team project and repository
from the git remote when it is passed the HTTPS remote form. Once
git-loom passes `--org` explicitly (which it does to avoid a misleading
login error), az stops auto-detecting both, so they must be supplied via
`--project` and `--repository`. With an SSH remote
(`git@ssh.dev.azure.com:v3/...`) az can never detect them, so PR
creation failed with:
ERROR: --project must be specified.
ERROR: A valid repository name is required.
Extract the project and repository from the remote URL alongside the org
(renaming `extract_azure_org_url` to `extract_azure_remote`) and pass
`--project`/`--repository` to both `az repos pr create` and
`az repos pr list`. The repository is the segment after `_git` (HTTPS)
or the third path segment (SSH). Legacy `visualstudio.com` collection
URLs are ambiguous about the project segment, so leave that to az
auto-detection.
dfaure-kdab
force-pushed
the
wip/dfaure/azure-ssh-project
branch
from
July 6, 2026 12:21
b00ae30 to
6854337
Compare
narnaud
approved these changes
Jul 7, 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.
az repos pr createonly auto-detects the team project from the git remote when it is passed the HTTPS remote form. Once git-loom passes--orgexplicitly (which it does to avoid a misleading login error), az stops auto-detecting the project, so it must be supplied via--project. With an SSH remote (git@ssh.dev.azure.com:v3/...) az can never detect the project, so PR creation failed with:Extract the project from the remote URL alongside the org (renaming
extract_azure_org_urltoextract_azure_remote) and pass--projectto bothaz repos pr createandaz repos pr list. Legacyvisualstudio.comcollection URLs are ambiguous about the project segment, so leave those to az auto-detection.