go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/api/v0/service_gerrit.proto (about) 1 // Copyright 2023 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 16 syntax = "proto3"; 17 18 package cv.v0; 19 20 option go_package = "go.chromium.org/luci/cv/api/v0;cvpb"; 21 22 import "google/protobuf/timestamp.proto"; 23 24 import "go.chromium.org/luci/cv/api/v0/run.proto"; 25 26 27 // GerritIntegration exposes APIs that Gerrit will call when rendering CL pages. 28 service GerritIntegration { 29 // GetCLRunInfo returns ongoing Run information for the given CL and the CLs 30 // that the given CL depends on. 31 rpc GetCLRunInfo(GetCLRunInfoRequest) returns (GetCLRunInfoResponse); 32 } 33 34 message GetCLRunInfoRequest { 35 // GerritChange is the change that Gerrit is currently rendering. 36 GerritChange gerrit_change = 1; 37 } 38 39 message GetCLRunInfoResponse { 40 message RunInfo { 41 // ID of the Run. 42 // 43 // The format of an ID is "projects/$luci-project/runs/$id", where 44 // - luci-project is the name of the LUCI project the Run belongs to 45 // - id is an opaque key unique in the LUCI project. 46 string id = 1; 47 // The time when the Run was created. 48 google.protobuf.Timestamp create_time = 2; 49 // The time when the Run was started. 50 google.protobuf.Timestamp start_time = 3; 51 // The change that receives the vote and triggers this Run. 52 GerritChange origin_change = 4; 53 // The mode of the Run. 54 string mode = 5; 55 } 56 // RunsAsOrigin are the ongoing runs originating from this CL. 57 // 58 // Typically, there would only be 1 that is the Run triggered by the 59 // CQ vote on this CL. 60 repeated RunInfo runs_as_origin = 1; 61 62 // RunsAsDep are the ongoing runs that involves this CL but not originates 63 // from the CL. 64 // 65 // Those Runs should be triggered by the CL that transitively depends on this 66 // CL. 67 repeated RunInfo runs_as_dep = 2; 68 69 message DepChangeInfo { 70 // GerritChange describes the dependency CL. 71 GerritChange gerrit_change = 1; 72 // Runs are ongoing Runs that involves the dependency CLs. 73 repeated RunInfo runs = 2; 74 // ChangeOwner is the owner of the dependency CL. 75 string change_owner = 3; 76 } 77 // DepChangeInfos are the information about the CLs that this CL depends on. 78 // 79 // If the developer ends up voting CQ+1/+2 on this CL, these would be all the 80 // CLs that will be involved in the Run. 81 // 82 // Note that only active CLs will be returned. 83 repeated DepChangeInfo dep_change_infos = 3; 84 }