This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathreviewer.proto
103 lines (94 loc) · 2.47 KB
/
reviewer.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
syntax = "proto3";
package com.google.startupos.tools.reviewer;
option java_package = "com.google.startupos.tools.reviewer";
option java_outer_classname = "ReviewerProtos";
/* Config for a single repo. */
message Repo {
// ID, e.g startup-os. This is used as the folder name in the local workspace.
// Should be unique in a Reviewer instance.
string id = 1;
// Url, e.g https://github.com/google/startup-os
string url = 2;
}
message CiRequest {
message Target {
Repo repo = 1;
string commit_id = 2;
}
int64 diff_id = 1;
repeated Target target = 2;
bool for_submission = 3;
}
message CiResponse {
CiRequest request = 1;
message TargetResult {
enum Status {
NONE = 0;
SUCCESS = 1;
FAIL = 2;
RUNNING = 3;
OUTDATED = 4;
}
CiRequest.Target target = 1;
Status status = 2;
string log = 3;
}
repeated TargetResult result = 2;
}
/* Config for a Reviewer instance, stored in config_repo in
* ReviewerRegistryConfig. */
message ReviewerConfig {
// Display name for Reviewer instance. Should be same as
// ReviewerRegistryConfig.display_name
string display_name = 1;
// Repos in this Reviewer instance
repeated Repo repo = 3;
repeated User user = 4;
repeated Project project = 5;
int32 total_crystal = 6;
}
// A user, a contributor to the Reviewer repos.
message User {
// A unique identifier for a user, e.g GitHub user
string id = 1;
string first_name = 2;
string last_name = 3;
string email = 4;
string image_url = 5;
repeated SocialNetwork social_network = 6;
// Skills the user has, e.g programming languages.
repeated string skill = 7;
// Projects the user works on
repeated string project_id = 8;
repeated Contribution top_contribution = 9;
int32 crystals = 10;
// List of things people think are worthy of crystals exchange
repeated string offer = 11;
}
message SocialNetwork {
enum Type {
NONE = 0;
FACEBOOK = 1;
TWITTER = 2;
LINKEDIN = 3;
GITHUB = 4;
}
Type type = 1;
string url = 2;
}
message Contribution {
string description = 1;
// E.g link to a GitHub Pull Request.
string url = 2;
}
message Project {
string id = 1;
string display_name = 2;
string project_url = 3;
// Short description
string description = 4;
// This is redundant since User lists projects, but we don't want to do the
// calculation in the front-end. We might add a test to enforce this, or push
// a better data structure to Firebase.
repeated string user_id = 5;
}