| // Copyright (C) 2019 The Android Open Source Project | |
| // | |
| // 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 = "proto2"; | |
| package gerrit.plugins.codeowners.backend.proto; | |
| option java_package = "com.google.gerrit.plugins.codeowners.backend.proto"; | |
| // The format of each OWNERS_METADATA textproto file. | |
| // Next ID: 2 | |
| message OwnersMetadataFile { | |
| // Specification of the code owners for files in this directory. | |
| optional OwnersConfig owners_config = 1; | |
| } | |
| // Owner configuration for a folder in a branch. | |
| // Next ID: 3 | |
| message OwnersConfig { | |
| // Whether the code owner configuration of the parent folder should be ignored. | |
| optional bool ignore_parent_owners = 1 [default=false]; | |
| // Definitions of code owners for different sets of paths. | |
| repeated OwnerSet owner_sets = 2; | |
| } | |
| // Definition of a set of owners. | |
| // Next ID: 3 | |
| message OwnerSet { | |
| // The per-file equivalent. Ownership is restricted when any paths are | |
| // present. The path expressions must be Google3 path expressions. | |
| repeated string path_expressions = 1; | |
| // Users that should be code owners. | |
| repeated Owner owners = 2; | |
| } | |
| // Definitions of an owner or group of owners. | |
| // Next ID: 2 | |
| message Owner { | |
| oneof ownertype { | |
| // Email of a user. The email must belong to exactly one active Gerrit | |
| // account. If the visibility of the Gerrit account is limited, users that | |
| // cannot see the account are not able to add that user as a reviewer. | |
| string email = 1; | |
| } | |
| } |