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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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(