Adds experimental support for Open in GitHub

This commit is contained in:
Eric Amodio
2017-03-24 01:28:05 -04:00
parent ba69a19eeb
commit 4f84c03275
21 changed files with 399 additions and 43 deletions

View File

@@ -10,6 +10,7 @@ export * from './models/models';
export * from './parsers/blameParser';
export * from './parsers/logParser';
export * from './parsers/statusParser';
export * from './hosting/hostingProvider';
let git: IGit;
@@ -210,6 +211,16 @@ export class Git {
return gitCommand(root, ...params);
}
static remote(repoPath: string): Promise<string> {
const params = ['remote', '-v'];
return gitCommand(repoPath, ...params);
}
static remote_url(repoPath: string, remote: string): Promise<string> {
const params = ['remote', 'get-url', remote];
return gitCommand(repoPath, ...params);
}
static status(repoPath: string): Promise<string> {
const params = ['status', '--porcelain=v2', '--branch'];
return gitCommand(repoPath, ...params);