Fixes # 122567: regex included .git in capture

pull/122603/head
Eric Amodio 2021-04-28 13:27:43 -04:00
parent 5082e72921
commit c8c96aae9d
1 changed files with 1 additions and 3 deletions

View File

@ -140,9 +140,7 @@ export class GithubPushErrorHandler implements PushErrorHandler {
return false;
}
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl)
|| /^git@github\.com:([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl);
const match = /^(?:https:\/\/github\.com\/|git@github\.com:)([^/]+)\/([^/.]+)(?:\.git)?$/i.exec(remoteUrl);
if (!match) {
return false;
}