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

GitRepository.HttpsUrl is wrong when hosted in Azure DevOps #1393

Open
ChristophLindemann opened this issue Jun 18, 2024 · 0 comments
Open
Labels

Comments

@ChristophLindemann
Copy link

Usage Information

8

Description

When a git repo is hosted in Azure DevOps, the HttpsUrl does not contain .git suffix.

The code in GitRepository is wrong, as it is hardcoded to expect the .git instead of reading origin from the git configuration

public string HttpsUrl => Endpoint != null ? $"https://{Endpoint}/{Identifier}.git" : null;

Reproduction Steps

Use a Azure DevOps repo

the url will be
HTTPS: https://[email protected]/Tenant/TheProject/_git/this-is-my-repo
SSH: [email protected]:v3/Tenant/TheProject/this-is-my-repo

Expected Behavior

GitRepository.HttpsUrl should return "https://[email protected]/Tenant/TheProject/_git/this-is-my-repo"

Actual Behavior

GitRepository.HttpsUrl actually return "https://dev.azure.com/Tenant/TheProject/_git/this-is-my-repo.git"

Regression?

No response

Known Workarounds

No response

Could you help with a pull-request?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant