Strip optional '.git' suffix from https server remote name.
This commit is contained in:
parent
0dfc93c104
commit
c2e9041213
2 changed files with 67 additions and 28 deletions
|
@ -46,12 +46,14 @@ export function getRemoteDetail(remoteUrl: string): RemoteDetail {
|
|||
throw new Error('Could not parse GitHub Server name')
|
||||
}
|
||||
|
||||
remoteUrl = remoteUrl.replace(/\.git$/, '')
|
||||
|
||||
const httpsUrlPattern = new RegExp(
|
||||
'^https?://.*@?' + githubServerMatch[1] + '/(.+/.+)$',
|
||||
'i'
|
||||
)
|
||||
const sshUrlPattern = new RegExp(
|
||||
'^git@' + githubServerMatch[1] + ':(.+/.+).git$',
|
||||
'^git@' + githubServerMatch[1] + ':(.+/.+)$',
|
||||
'i'
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue