Skip to content

Commit bc4137f

Browse files
committed
[papi] Add proto for SCMService
1 parent 4ac04ee commit bc4137f

File tree

7 files changed

+1845
-38
lines changed

7 files changed

+1845
-38
lines changed

components/public-api/gitpod/v1/scm.proto

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,62 @@ import "google/protobuf/timestamp.proto";
66

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

9+
service SCMService {
10+
rpc GetSCMToken(GetSCMTokenRequest) returns (GetSCMTokenResponse) {}
11+
rpc GuessTokenScopes(GuessTokenScopesRequest) returns (GuessTokenScopesResponse) {}
12+
rpc SearchRepositories(SearchRepositoriesRequest) returns (SearchRepositoriesResponse) {}
13+
rpc ListSuggestedRepositories(ListSuggestedRepositoriesRequest) returns (ListSuggestedRepositoriesResponse) {}
14+
}
15+
16+
message GetSCMTokenRequest {
17+
string host = 1;
18+
}
19+
message GetSCMTokenResponse {
20+
SCMToken token = 1;
21+
}
22+
23+
message GuessTokenScopesRequest {
24+
string host = 1;
25+
string repo_url = 2;
26+
string git_command = 3;
27+
}
28+
message GuessTokenScopesResponse {
29+
repeated string scopes = 1;
30+
string message = 2;
31+
}
32+
33+
message SearchRepositoriesRequest {
34+
string search_string = 1;
35+
int32 limit = 2;
36+
}
37+
message SearchRepositoriesResponse {
38+
repeated SuggestedRepository repositories = 1;
39+
}
40+
41+
message ListSuggestedRepositoriesRequest {
42+
string organization_id = 1;
43+
}
44+
message ListSuggestedRepositoriesResponse {
45+
repeated SuggestedRepository repositories = 1;
46+
}
47+
48+
message SCMToken {
49+
string username = 1;
50+
string value = 2;
51+
string id_token = 3;
52+
string refresh_token = 4;
53+
repeated string scopes = 5;
54+
google.protobuf.Timestamp update_date = 6;
55+
google.protobuf.Timestamp expiry_date = 7;
56+
}
57+
58+
message SuggestedRepository {
59+
string url = 1;
60+
string repo_name = 2;
61+
string configuration_id = 3;
62+
string configuration_name = 4;
63+
}
64+
965
message Author {
1066
string name = 1;
1167
string avatar_url = 2;

0 commit comments

Comments
 (0)