Fixes codespaces fork on push
Codespaces might not have a push url on the remote, so use the fetch url
This commit is contained in:
parent
d765f3a43c
commit
38160c823c
1 changed files with 4 additions and 3 deletions
|
@ -161,12 +161,13 @@ export class GithubPushErrorHandler implements PushErrorHandler {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!remote.pushUrl) {
|
||||
const remoteUrl = remote.pushUrl || (isInCodespaces() ? remote.fetchUrl : undefined);
|
||||
if (!remoteUrl) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\.git/i.exec(remote.pushUrl)
|
||||
|| /^git@github\.com:([^/]+)\/([^/]+)\.git/i.exec(remote.pushUrl);
|
||||
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\.git/i.exec(remoteUrl)
|
||||
|| /^git@github\.com:([^/]+)\/([^/]+)\.git/i.exec(remoteUrl);
|
||||
|
||||
if (!match) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue