-
-
Notifications
You must be signed in to change notification settings - Fork 46
Improve the SubmitRecord structure #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
6bb5a61
020688c
8acfefd
267b8cc
17faa1d
4ee8af4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,17 +223,40 @@ type TopicInput struct { | |
Topic string `json:"topic,omitempty"` | ||
} | ||
|
||
type Account struct { | ||
AccountId int `json:"_account_id"` | ||
Name string `json:"name"` | ||
Email string `json:"email"` | ||
Username string `json:"username"` | ||
Tags []string `json:"tags,omitempty"` | ||
} | ||
|
||
type SubmitRecordLabel struct { | ||
Label string `json:"label"` | ||
Status string `json:"status"` | ||
AppliedBy *Account `json:"applied_by,omitempty"` | ||
Ai-feier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// SubmitRecord entity describes results from a submit_rule. | ||
type SubmitRecord struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the docs, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a new commit I have modified |
||
RuleName string `json:"rule_name"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please extend the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a new commit I have modified |
||
Status string `json:"status"` | ||
Labels []SubmitRecordLabel `json:"labels"` | ||
Ai-feier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Ok map[string]map[string]AccountInfo `json:"ok,omitempty"` | ||
Reject map[string]map[string]AccountInfo `json:"reject,omitempty"` | ||
Need map[string]interface{} `json:"need,omitempty"` | ||
May map[string]map[string]AccountInfo `json:"may,omitempty"` | ||
Impossible map[string]interface{} `json:"impossible,omitempty"` | ||
Requirements []Requirement `json:"requirements,omitempty"` | ||
ErrorMessage string `json:"error_message,omitempty"` | ||
} | ||
|
||
type Requirement struct { | ||
Status string `json:"status"` | ||
FallbackText string `json:"fallback_text"` | ||
Type string `json:"type"` | ||
} | ||
|
||
// SubmitInput entity contains information for submitting a change. | ||
type SubmitInput struct { | ||
OnBehalfOf string `json:"on_behalf_of,omitempty"` | ||
|
@@ -472,6 +495,7 @@ type ChangeInfo struct { | |
CherryPickOfPatchSet int `json:"cherry_pick_of_patch_set,omitempty"` | ||
ContainsGitConflicts bool `json:"contains_git_conflicts,omitempty"` | ||
BaseChange string `json:"base_change,omitempty"` | ||
SubmitRecords []SubmitRecord `json:"submit_records"` | ||
Ai-feier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// LabelInfo entity contains information about a label on a change, always corresponding to the current patch set. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, as we need an
AccountInfo
typeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a new commit I have modified