-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Azure URL generation * Add remote test
- Loading branch information
1 parent
2a9741f
commit 7825027
Showing
6 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# GitLink Changelog | ||
|
||
## Unreleased | ||
- Fix Azure URL generation | ||
|
||
## 4.5.1 - 2024-09-03 | ||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,11 @@ val GitRemote.httpUrl : URL? get() { | |
var url = firstUrl ?: return null | ||
|
||
url = url.trim() | ||
.removeSuffix(".git") | ||
|
||
// Azure supports a .git suffix on the repo name, so don't remove it. | ||
if (!url.contains("dev.azure")) { | ||
url = url.removeSuffix(".git") | ||
} | ||
|
||
// Do not try to remove the port if the URL uses the SSH protocol in the SCP syntax e.g. | ||
// '[email protected]:foo.git' as it does not support port definitions. Attempting to remove the port | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,11 @@ class RemoteTest { | |
Arguments.of( | ||
"xy://custom.gitlab.url/group/project.git", | ||
"http://custom.gitlab.url/group/project" | ||
) | ||
), | ||
Arguments.of( | ||
"http://[email protected]/ben-gibson/test/_git/test.git", | ||
"http://dev.azure.com/ben-gibson/test/_git/test.git" | ||
), | ||
) | ||
} | ||
|
||
|
This file contains 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