// Copyright 2020 The Pigweed 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
//
//     https://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 recipe_modules.pigweed.roll_util;

message LabelToSet {
  // Name of label to set.
  string label = 1;

  // Value of label to set.
  int32 value = 2;
}

message InputProperties {
  // Additional labels to set when uploading patches.
  repeated LabelToSet labels_to_set = 1;

  // Non-CQ/CR labels to wait on before attempting submission.
  repeated string labels_to_wait_on = 2;

  // Line of text to divide the commit header and body from the footers.
  string commit_divider = 3;

  // Additional lines to add to the footer of roll commit messages.
  repeated string footer = 4;
}
