import { HostingManagerBase } from '../../basic/HostingPlatform/HostingManagerBase' ; import { GitHubApp } from './GitHubApp' ; import { GitHubClient } from './GitHubClient' ; import Octokit = require ( '@octokit/rest' ) ; import { GitHubConfig } from './GitHubConfig' ; import { Application } from 'egg' ; import { getConfigMeta } from '../../config-generator/decorators' ; export class GitHubManager extends HostingManagerBase < GitHubApp , GitHubClient , Octokit , GitHubConfig > { constructor ( config , app ) { super ( config , app ) ; this . type = 'github' ; } protected async getNewHostingPlatform ( id , config ) { return new GitHubApp ( id , config , this . app ) ; } public getConfigType ( ) { return getConfigMeta ( GitHubConfig ) ; } }