Use GitHub app for VSO, closes #92675

This commit is contained in:
Rachel Macfarlane
2020-03-23 07:52:09 -07:00
parent d21cadb83f
commit d9d90a0d3d
10 changed files with 149 additions and 5 deletions

View File

@@ -21,6 +21,8 @@ export interface ClientConfig {
VSO: ClientDetails;
VSO_PPE: ClientDetails;
VSO_DEV: ClientDetails;
GITHUB_APP: ClientDetails;
}
export class Registrar {
@@ -38,10 +40,20 @@ export class Registrar {
EXPLORATION: {},
VSO: {},
VSO_PPE: {},
VSO_DEV: {}
VSO_DEV: {},
GITHUB_APP: {}
};
}
}
getGitHubAppDetails(): ClientDetails {
if (!this._config.GITHUB_APP.id || !this._config.GITHUB_APP.secret) {
throw new Error(`No GitHub App client configuration available`);
}
return this._config.GITHUB_APP;
}
getClientDetails(callbackUri: Uri): ClientDetails {
let details: ClientDetails | undefined;
switch (callbackUri.scheme) {