Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit e764751

Browse files
authored
feat(vscode-github): allow https-origin for github detection (#16)
1 parent 51a81b1 commit e764751

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/git.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import * as execa from 'execa';
33
export async function getGitHubOwnerAndRepository(cwd: string): Promise<string[]> {
44
return execa('git', ['config', '--get-regexp', 'remote\\.origin\\.url'], {cwd})
55
.then(result => {
6-
const match = result.stdout.match(/^remote.origin.url git@github.com:(.*?)\/(.*?)(?:.git)?$/);
6+
const match = result.stdout.match(
7+
/^remote\.origin\.url (?:git@github\.com:|https:\/\/github.com\/)(.*?)\/(.*?)(?:.git)?$/);
78
if (!match) {
89
throw new Error('Not a github project?');
910
}

0 commit comments

Comments
 (0)