Skip to content

Commit c84ca73

Browse files
committed
[server] make GH App methods no-op (compat)
1 parent 523df41 commit c84ca73

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

components/gitpod-protocol/src/gitpod-service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
214214
deleteGitpodToken(tokenHash: string): Promise<void>;
215215

216216
// misc
217+
/** @deprecated always returns false */
217218
isGitHubAppEnabled(): Promise<boolean>;
219+
/** @deprecated this is a no-op */
218220
registerGithubApp(installationId: string): Promise<void>;
219221

220222
/**

components/server/src/workspace/gitpod-server-impl.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import {
8-
AppInstallationDB,
98
UserDB,
109
WorkspaceDB,
1110
DBWithTracing,
@@ -224,8 +223,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
224223

225224
@inject(LinkedInService) private readonly linkedInService: LinkedInService,
226225

227-
@inject(AppInstallationDB) private readonly appInstallationDB: AppInstallationDB,
228-
229226
@inject(AuthProviderService) private readonly authProviderService: AuthProviderService,
230227

231228
@inject(GitTokenScopeGuesser) private readonly gitTokenScopeGuesser: GitTokenScopeGuesser,
@@ -1849,24 +1846,10 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
18491846
}
18501847

18511848
async isGitHubAppEnabled(ctx: TraceContext): Promise<boolean> {
1852-
await this.checkAndBlockUser();
1853-
return !!this.config.githubApp?.enabled;
1849+
return false;
18541850
}
18551851

1856-
async registerGithubApp(ctx: TraceContext, installationId: string): Promise<void> {
1857-
traceAPIParams(ctx, { installationId });
1858-
1859-
const user = await this.checkAndBlockUser();
1860-
1861-
if (!this.config.githubApp?.enabled) {
1862-
throw new ApplicationError(
1863-
ErrorCodes.NOT_FOUND,
1864-
"No GitHub app enabled for this installation. Please talk to your administrator.",
1865-
);
1866-
}
1867-
1868-
await this.appInstallationDB.recordNewInstallation("github", "user", installationId, user.id);
1869-
}
1852+
async registerGithubApp(ctx: TraceContext, installationId: string): Promise<void> {}
18701853

18711854
async takeSnapshot(ctx: TraceContext, options: GitpodServer.TakeSnapshotOptions): Promise<string> {
18721855
traceAPIParams(ctx, { options });

0 commit comments

Comments
 (0)