blob: cd812c822646490ab8bc9237272bc6e7fe14a2de [file]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is govered by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// This file defines protobufs for issues and related business
// objects, e.g., field values, comments, and attachments.
syntax = "proto3";
package monorail;
import "api/api_proto/common.proto";
// Next available tag: 8
message Approval {
FieldRef field_ref = 1;
repeated UserRef approver_refs = 2;
ApprovalStatus status = 3;
fixed32 set_on = 4;
UserRef setter_ref = 5;
PhaseRef phase_ref = 7;
}
// Next available tag: 8
enum ApprovalStatus {
NOT_SET = 0;
NEEDS_REVIEW = 1;
NA = 2;
REVIEW_REQUESTED = 3;
REVIEW_STARTED = 4;
NEED_INFO = 5;
APPROVED = 6;
NOT_APPROVED = 7;
}
// This message is only suitable for displaying the amendment to users.
// We don't currently offer structured amendments that client code can
// reason about, field names can be ambiguous, and we don't have
// old_value for most changes.
// Next available tag: 4
message Amendment {
// This may be the name of a built-in or custom field, or relative to
// an approval field name.
string field_name = 1;
// This may be a new value that overwrote the old value, e.g., "Assigned",
// or it may be a space-separated list of changes, e.g., "Size-L -Size-S".
string new_or_delta_value = 2;
// old_value is only used when the user changes the summary.
string old_value = 3;
}
// Next available tag: 9
message Attachment {
uint64 attachment_id = 1;
string filename = 2;
uint64 size = 3; // Size in bytes.
string content_type = 4;
bool is_deleted = 5;
string thumbnail_url = 6;
string view_url = 7;
string download_url = 8;
}
// Next available tag: 14
message Comment {
string project_name = 1;
uint32 local_id = 2;
uint32 sequence_num = 3;
bool is_deleted = 4;
UserRef commenter = 5;
fixed32 timestamp = 6;
string content = 7;
string inbound_message = 8;
repeated Amendment amendments = 9;
repeated Attachment attachments = 10;
FieldRef approval_ref = 11;
// If set, this comment is an issue description.
uint32 description_num = 12;
bool is_spam = 13;
// TODO(jrobbins): How do we tell the client which comments the user
// is allowed to undelete without exposing who deleted it?
}
// Next available tag: 5
message FieldValue {
FieldRef field_ref = 1;
string value = 2;
bool is_derived = 3;
PhaseRef phase_ref = 4;
}
// Next available tag: 23
message Issue {
string project_name = 1;
uint32 local_id = 2;
string summary = 3;
StatusRef status_ref = 4;
UserRef owner_ref = 5;
repeated UserRef cc_refs = 6;
repeated LabelRef label_refs = 7;
repeated ComponentRef component_refs = 8;
repeated IssueRef blocked_on_issue_refs = 9;
repeated IssueRef blocking_issue_refs = 10;
IssueRef merged_into_issue_ref = 11;
repeated FieldValue field_values = 12;
bool is_deleted = 13;
UserRef reporter_ref = 14;
fixed32 opened_timestamp = 15;
fixed32 closed_timestamp = 16;
fixed32 modified_timestamp = 17;
uint32 star_count = 18;
bool is_spam = 19;
uint32 attachment_count = 20;
repeated Approval approval_values = 21;
repeated PhaseDef phases = 22;
}
// Next available tag:
message IssueSummary {
string project_name = 1;
uint32 local_id = 2;
string summary = 3;
}
// Next available tag:3
message PhaseDef {
PhaseRef phase_ref = 1;
uint32 rank = 2;
}
// Next available tag:2
message PhaseRef {
string phase_name = 1;
}