diff --git a/components/gitpod-protocol/src/context-url.spec.ts b/components/gitpod-protocol/src/context-url.spec.ts index 7f31e59060a509..5549bb9dc8bdcf 100644 --- a/components/gitpod-protocol/src/context-url.spec.ts +++ b/components/gitpod-protocol/src/context-url.spec.ts @@ -41,24 +41,6 @@ export class ContextUrlTest { expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo.git"); } - @test public parseContextUrl_withPrebuild() { - const actual = ContextURL.getNormalizedURL({ - contextURL: "prebuild/https://github.com/gitpod-io/gitpod-test-repo", - context: {}, - } as WsContextUrl); - expect(actual?.host).to.equal("github.com"); - expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo"); - } - - @test public parseContextUrl_withPrebuild_withoutSchema() { - const actual = ContextURL.getNormalizedURL({ - contextURL: "prebuild/github.com/gitpod-io/gitpod-test-repo", - context: {}, - } as WsContextUrl); - expect(actual?.host).to.equal("github.com"); - expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo"); - } - @test public parseContextUrl_badUrl() { const actual = ContextURL.getNormalizedURL({ contextURL: "[Object object]", context: {} } as WsContextUrl); expect(actual).to.be.undefined; diff --git a/components/gitpod-protocol/src/context-url.ts b/components/gitpod-protocol/src/context-url.ts index ee75e008527880..74995651ccb884 100644 --- a/components/gitpod-protocol/src/context-url.ts +++ b/components/gitpod-protocol/src/context-url.ts @@ -15,7 +15,6 @@ import { Workspace } from "."; * TODO(gpl) See if we can get this into `server` code to remove the burden from clients */ export namespace ContextURL { - export const INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild"; export const PREBUILD_PREFIX = "prebuild"; export const IMAGEBUILD_PREFIX = "imagebuild"; export const SNAPSHOT_PREFIX = "snapshot"; @@ -91,7 +90,6 @@ export namespace ContextURL { const firstSegment = segments[0]; if ( firstSegment === PREBUILD_PREFIX || - firstSegment === INCREMENTAL_PREBUILD_PREFIX || firstSegment === IMAGEBUILD_PREFIX || firstSegment === SNAPSHOT_PREFIX || firstSegment.startsWith(REFERRER_PREFIX) diff --git a/components/server/ee/src/prebuilds/start-prebuild-context-parser.ts b/components/server/ee/src/prebuilds/start-prebuild-context-parser.ts index 9594c329478307..d13134da03412d 100644 --- a/components/server/ee/src/prebuilds/start-prebuild-context-parser.ts +++ b/components/server/ee/src/prebuilds/start-prebuild-context-parser.ts @@ -19,14 +19,8 @@ export class StartPrebuildContextParser implements IPrefixContextParser { } public async handle(user: User, prefix: string, context: WorkspaceContext): Promise { - if (IssueContext.is(context)) { - throw new Error("cannot start prebuilds on an issue context"); - } - - const result: StartPrebuildContext = { - title: `Prebuild of "${context.title}"`, - actual: context, - }; - return result; + throw new Error( + `Running prebuilds without a project is no longer supported. Please add your repository as a project in a Gitpod team.`, + ); } }