Skip to content

Commit d32e231

Browse files
authored
[public-api] align context url with server (#18292)
* [public-api] align context url with server * 💄 * update test case * Update test case
1 parent dd5ae6b commit d32e231

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/public-api-server/pkg/apiv1/workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func convertWorkspaceInfo(input *protocol.WorkspaceInfo) (*v1.Workspace, error)
324324
Context: &v1.WorkspaceContext{
325325
ContextUrl: input.Workspace.ContextURL,
326326
Details: &v1.WorkspaceContext_Git_{Git: &v1.WorkspaceContext_Git{
327-
NormalizedContextUrl: input.Workspace.ContextURL,
327+
NormalizedContextUrl: input.Workspace.Context.NormalizedContextURL,
328328
Commit: "",
329329
}},
330330
},

components/public-api-server/pkg/apiv1/workspace_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,9 @@ var workspaceTestData = []workspaceTestDataEntry{
613613
BaseImageNameResolved: "foo:bar",
614614
ID: "gitpodio-gitpod-isq6xj458lj",
615615
OwnerID: "fake-owner-id",
616-
ContextURL: "https://github.com/gitpod-io/gitpod",
616+
ContextURL: "open-prebuild/126ac54a-5922-4a45-9a18-670b057bf540/https://github.com/gitpod-io/gitpod/pull/18291",
617617
Context: &protocol.WorkspaceContext{
618-
NormalizedContextURL: "https://github.com/gitpod-io/protocol.git",
618+
NormalizedContextURL: "https://github.com/gitpod-io/gitpod/pull/18291",
619619
Title: "tes ttitle",
620620
Repository: &protocol.Repository{
621621
Host: "github.com",
@@ -659,10 +659,10 @@ var workspaceTestData = []workspaceTestDataEntry{
659659
WorkspaceId: "gitpodio-gitpod-isq6xj458lj",
660660
OwnerId: "fake-owner-id",
661661
Context: &v1.WorkspaceContext{
662-
ContextUrl: "https://github.com/gitpod-io/gitpod",
662+
ContextUrl: "open-prebuild/126ac54a-5922-4a45-9a18-670b057bf540/https://github.com/gitpod-io/gitpod/pull/18291",
663663
Details: &v1.WorkspaceContext_Git_{
664664
Git: &v1.WorkspaceContext_Git{
665-
NormalizedContextUrl: "https://github.com/gitpod-io/gitpod",
665+
NormalizedContextUrl: "https://github.com/gitpod-io/gitpod/pull/18291",
666666
},
667667
},
668668
},

0 commit comments

Comments
 (0)