Skip to content

Commit

Permalink
Add context service
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 15, 2023
1 parent 907dc28 commit 6526f76
Show file tree
Hide file tree
Showing 10 changed files with 741 additions and 0 deletions.
24 changes: 24 additions & 0 deletions components/public-api/gitpod/v1/context.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";

service ContextService {
// ParseContext parses the url and returns the context
rpc ParseContext(ParseContextRequest) returns (ParseContextResponse) {}
}

message ParseContextRequest {
string url = 1;
}

message ParseContextResponse {
Context context = 1;
}

message Context {
string title = 1;
string normalized_url = 2;
string ref = 3;
}
3 changes: 3 additions & 0 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ message CreateAndStartWorkspaceRequest {
string create_local_branch = 3;
}

// git describes the source refer of workspace
// Obtain available git using the ContextService.ParseContext operation if
// not sure about it.
Git git = 1;
}

Expand Down
305 changes: 305 additions & 0 deletions components/public-api/go/v1/context.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6526f76

Please sign in to comment.