| // Copyright 2020 The Chromium Authors. All Rights Reserved. |
| // Use of this source code is governed by the Apache v2.0 license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package rubber_stamper.config; |
| |
| option go_package = "infra/appengine/rubber-stamper/config"; |
| |
| // Config is the service-wide configuration data for rubber-stamper. |
| message Config { |
| // A map stores configs for all the Gerrit hosts, where keys are names of |
| // hosts (e.g. "chromium" or "chrome-internal"), values are corresponding |
| // configs. |
| map<string, HostConfig> host_configs = 1; |
| // A global default time window for clean reverts and cherry picks. The |
| // format is the same as that of CleanRevertPattern.time_window. |
| string default_time_window = 2; |
| } |
| |
| // HostConfig describes the config to be used for a Gerrit host. |
| message HostConfig { |
| // A map stores config for repositories, where keys are names of repos (e.g. |
| // "chromium/src", "infra/infra") and values are corresponding configs. |
| map<string, RepoConfig> repo_configs = 1; |
| // The default valid time window for clean reverts. This time window is |
| // applied at a host-level and the time window configured in repo-level |
| // configs will override this one. The format is the same as that of |
| // CleanRevertPattern.time_window. |
| string clean_revert_time_window = 2; |
| } |
| |
| // RepoConfig describes the config to be used for a Gerrit repository. |
| message RepoConfig { |
| BenignFilePattern benign_file_pattern = 1; |
| CleanRevertPattern clean_revert_pattern = 2; |
| } |
| |
| // BenignFilePattern describes pattern of changes to benign files. |
| message BenignFilePattern { |
| // file_extension_map has been deprecated. |
| reserved 1; |
| // Paths contains the information that which files are allowed and which are |
| // not. The paths is parsed as lines in a .gitignore document, and therefore |
| // should follows rules listed in https://git-scm.com/docs/gitignore. |
| repeated string paths = 2; |
| } |
| |
| // CleanRevertPattern describes pattern of clean reverts. |
| message CleanRevertPattern { |
| // The length of time in <int><unit> form. Reverts need to be within this |
| // time_window to be valid. |
| // Valid units are "s", "m", "h", "d", meaning "seconds", "minutes", |
| // "hours", "days" respectively. |
| string time_window = 1; |
| |
| // Paths that must have a human reviewer. |
| repeated string excluded_paths = 2; |
| } |