mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 22:47:17 +00:00
22 lines
640 B
TypeScript
22 lines
640 B
TypeScript
import { Config, Output } from '@pulumi/pulumi';
|
|
import { ServiceSecret } from '../utils/secrets';
|
|
|
|
class GitHubIntegrationSecret extends ServiceSecret<{
|
|
appId: string | Output<string>;
|
|
privateKey: string | Output<string>;
|
|
}> {}
|
|
|
|
export function configureGithubApp() {
|
|
const githubAppConfig = new Config('ghapp');
|
|
const githubSecret = new GitHubIntegrationSecret('gitub-app', {
|
|
appId: githubAppConfig.require('id'),
|
|
privateKey: githubAppConfig.requireSecret('key'),
|
|
});
|
|
|
|
return {
|
|
name: githubAppConfig.require('name'),
|
|
secret: githubSecret,
|
|
};
|
|
}
|
|
|
|
export type GitHubApp = ReturnType<typeof configureGithubApp>;
|