blob: 255c15bbf154b641d2cc9b4182206c42cfd4b8dd [file] [log] [blame]
// Copyright 2020 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package cv.internal.gerrit.poller;
option go_package = "go.chromium.org/luci/cv/internal/gerrit/poller;poller";
import "google/protobuf/timestamp.proto";
// QueryState represents execution of a single Gerrit query over time.
//
// Exactly one of (or_projects, common_project_prefix) must be specified.
// Not using oneof to avoid wrapping or_projects in a message as oneof doesn't
// support repeated fields.
message QueryState {
// Host is Gerrit host.
string host = 1;
// Enumerated Gerrit projects, e.g. ["infra/infra", "infra/luci/luci-go"].
repeated string or_projects = 2;
// Common Gerrit project prefix, e.g. "chromiumos/".
string common_project_prefix = 3;
// When the last full poll was started.
google.protobuf.Timestamp last_full_time = 11;
// When the last incremental poll was started.
google.protobuf.Timestamp last_incr_time = 12;
// Changes are changes which were last observed by the query execution.
//
// These are not CL IDs, but Gerrit change numbers.
//
// The full poll resets these.
// The incremental poll adds newly discovered CLs.
//
// Sorted.
repeated int64 changes = 13;
}
// QueryStates exists to reference several QueryStates as a single property in a
// Datastore entity.
message QueryStates {
repeated QueryState states = 1;
}