Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-repos: fix org name in userinfo #1522

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

mjcheetham
Copy link
Collaborator

Fix a bug in the Azure Repos host provider that prevented the Azure DevOps organisation name from being pulled from the userinfo part of the remote URL.

When creating the remote URL from Git input in multiple places we had not been preserving the userinfo part that was subsequently passed to the CreateOrganizationUri helper method to extract the org URL.

Also add an additional test for PAT mode to cover this use case.

Fixes #1520

Fix a bug in the Azure Repos host provider that prevented the Azure
DevOps organisation name from being pulled from the userinfo part of the
remote URL.

When creating the remote URL from Git input in multiple places we had
not been preserving the userinfo part that was subsequently passed to
the `CreateOrganizationUri` helper method to extract the org URL.

Also add an additional test for PAT mode to cover this use case.
Copy link
Contributor

@vdye vdye left a comment

Choose a reason for hiding this comment

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

The affected case is admittedly a bit confusing (the org name is sometimes the "username" in Azure Repos?), but the fix looks properly implemented and well-tested.

@mjcheetham mjcheetham merged commit e51e1a4 into git-ecosystem:main Feb 22, 2024
6 checks passed
@mjcheetham
Copy link
Collaborator Author

The affected case is admittedly a bit confusing (the org name is sometimes the "username" in Azure Repos?)

Yep! When the rename from Visual Studio Team Services to Azure DevOps happened, and the URLs changed from org.visualstudio.com to dev.azure.com/org AzDO needed a way to pass the org part of the URL to Git (which by default omits the path). So they added the org name to the username.

Here's the "Clone" button on an Azure DevOps repo showing the default generated URL with the org name in the userinfo part of the URL..

image

@mjcheetham mjcheetham mentioned this pull request Apr 16, 2024
mjcheetham added a commit that referenced this pull request Apr 16, 2024
**Changes:**

- Fixes to install from source script (#1469)
- Use Avalonia generated view code (#14790
- Various GitHub Actions updates (#1473, #1483, #1487, #1486, #1488,
#1528, #1547)
- Fix bug in Azure Repos URL handling (#1522)
- Add Azure Managed Identity and SP docs (#1548)
- Fix error messages when using GCM outside of repo (#1561, #1583)
- Remove ESRP (#1571)
- Update to .NET 8 for Mac and Linux (#1579, #1580)
- Fix Alpine install from source script (#1582)
@mjcheetham mjcheetham deleted the fix-org-username-azdo branch April 17, 2024 16:56
Redemtion1

This comment was marked as off-topic.

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.

GCM fails to get the Azure organization name from the URL username
4 participants