fix: strip optional '.git' suffix from https server remote name. (#1153)

* Strip optional '.git' suffix from https server remote name.

* Revert "Strip optional '.git' suffix from https server remote name."

This reverts commit c2e9041213.

* Strip optional '.git' suffix from https server remote name.
This commit is contained in:
Scott Alexander
2022-03-31 01:10:39 -07:00
committed by GitHub
parent 0dfc93c104
commit 15b68d176d
3 changed files with 70 additions and 28 deletions

View File

@ -47,7 +47,7 @@ export function getRemoteDetail(remoteUrl: string): RemoteDetail {
}
const httpsUrlPattern = new RegExp(
'^https?://.*@?' + githubServerMatch[1] + '/(.+/.+)$',
'^https?://.*@?' + githubServerMatch[1] + '/(.+/.+?)(.git)?$',
'i'
)
const sshUrlPattern = new RegExp(