fix: use web_url instead of http_url_to_repo for GitLab repository URL
The normalizeRepositoryCloneUrls function was using http_url_to_repo (which has a .git suffix) as the url field. This caused the 'Open on GitLab' button to open a .git-suffixed URL and display it in the UI. Use web_url instead, which is the proper browser URL and also works as an HTTPS clone URL.
This commit is contained in:
1 file changed
+1
-1
@@ -176,7 +176,7 @@ function normalizeRepositoryCloneUrls(
|
||||
): GitLabRepositoryCloneUrls {
|
||||
return {
|
||||
nameWithOwner: raw.path_with_namespace,
|
||||
url: raw.http_url_to_repo || raw.web_url,
|
||||
url: raw.web_url,
|
||||
sshUrl: raw.ssh_url_to_repo,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user