Skip to content

Commit

Permalink
[papi] Add proto for SCMService
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev committed Nov 15, 2023
1 parent eaae6cc commit c6877d7
Show file tree
Hide file tree
Showing 7 changed files with 1,949 additions and 0 deletions.
65 changes: 65 additions & 0 deletions components/public-api/gitpod/v1/scm.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
syntax = "proto3";

package gitpod.v1;

import "google/protobuf/timestamp.proto";

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

service SCMService {
rpc GetToken(GetTokenRequest) returns (GetTokenResponse) {}
rpc GuessTokenScopes(GuessTokenScopesRequest) returns (GuessTokenScopesResponse) {}
rpc SearchRepositories(SearchRepositoriesRequest) returns (SearchRepositoriesResponse) {}
rpc ListSuggestedRepositories(ListSuggestedRepositoriesRequest) returns (ListSuggestedRepositoriesResponse) {}
}

message GetTokenRequest {
string host = 1;
string organization_id = 2;
}
message GetTokenResponse {
GitToken token = 1;
}

message GuessTokenScopesRequest {
string host = 1;
string repo_url = 2;
string git_command = 3;
}
message GuessTokenScopesResponse {
repeated string scopes = 1;
string message = 2;
}

message SearchRepositoriesRequest {
string organization_id = 1;
string search_string = 2;
int32 limit = 3;
}
message SearchRepositoriesResponse {
repeated SuggestedRepository repositories = 1;
}

message ListSuggestedRepositoriesRequest {
string organization_id = 1;
}
message ListSuggestedRepositoriesResponse {
repeated SuggestedRepository repositories = 1;
}

message GitToken {
string username = 1;
string value = 2;
string id_token = 3;
string refresh_token = 4;
repeated string scopes = 5;
google.protobuf.Timestamp update_date = 6;
google.protobuf.Timestamp expiry_date = 7;
}

message SuggestedRepository {
string url = 1;
string repo_name = 2;
string config_name = 3;
string config_id = 4;
}
Loading

0 comments on commit c6877d7

Please sign in to comment.