diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index 498ee53bcca63d..7c3fec948138f6 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -1127,7 +1127,7 @@ export interface WithCommitHistory { export interface StartPrebuildContext extends WorkspaceContext, WithCommitHistory { actual: WorkspaceContext; - project?: Project; + project: Project; branch?: string; } diff --git a/components/server/ee/src/prebuilds/prebuild-manager.ts b/components/server/ee/src/prebuilds/prebuild-manager.ts index fe6c8e0b96c6f3..c3fb20b99fa5b5 100644 --- a/components/server/ee/src/prebuilds/prebuild-manager.ts +++ b/components/server/ee/src/prebuilds/prebuild-manager.ts @@ -128,6 +128,11 @@ export class PrebuildManager { if (user.blocked) { throw new Error(`Blocked users cannot start prebuilds (${user.name})`); } + if (!project) { + throw new Error( + `Running prebuilds without a project is no longer supported. Please add '${cloneURL}' as a project in a Gitpod team.`, + ); + } const existingPB = await this.findNonFailedPrebuiltWorkspace({ span }, cloneURL, commitSHAIdentifier); // If the existing prebuild is failed, it will be retriggered in the afterwards