mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Add GitHub authentication provider extension, closes #90384
This commit is contained in:
committed by
GitHub
parent
ebb6aaa8f4
commit
eed39324b6
@@ -88,6 +88,8 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
|
||||
generator.execute();
|
||||
}
|
||||
|
||||
generateGitHubAuthConfig();
|
||||
|
||||
return srcPipe
|
||||
.pipe(generator.stream)
|
||||
.pipe(compile())
|
||||
@@ -115,6 +117,19 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
|
||||
|
||||
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
|
||||
|
||||
function generateGitHubAuthConfig() {
|
||||
const schemes = ['OSS', 'INSIDERS'];
|
||||
let content: { [key: string]: { id?: string, secret?: string }} = {};
|
||||
schemes.forEach(scheme => {
|
||||
content[scheme] = {
|
||||
id: process.env[`${scheme}_GITHUB_ID`],
|
||||
secret: process.env[`${scheme}_GITHUB_SECRET`]
|
||||
};
|
||||
});
|
||||
|
||||
fs.writeFileSync(path.join(__dirname, '../../extensions/github-authentication/src/common/config.json'), JSON.stringify(content));
|
||||
}
|
||||
|
||||
class MonacoGenerator {
|
||||
private readonly _isWatch: boolean;
|
||||
public readonly stream: NodeJS.ReadWriteStream;
|
||||
|
||||
Reference in New Issue
Block a user