-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
33 lines (28 loc) · 1.01 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package danger
type Results struct {
Fails []Violation `json:"fails"`
Warnings []Violation `json:"warnings"`
Messages []Violation `json:"messages"`
// Markdowns are messages to attach at the bottom of the comment
Markdowns []Violation `json:"markdowns"`
GitHub *GitHubResults `json:"github,omitempty"`
Meta *MetaResults `json:"meta,omitempty"`
}
type Violation struct {
Message string `json:"message"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
// Icon is an optional icon for table (Only valid for messages).
Icon string `json:"icon,omitempty"`
}
type GitHubResults struct {
// StepSummary is Markdown text which gets added as a summary in the first
// page which you see when you click through to the PR results.
StepSummary string `json:"stepSummary,omitempty"`
}
type MetaResults struct {
// RuntimeRef e.g. "https://danger.systems/js"
RuntimeRef string `json:"runtimeRef"`
// RuntimeName E.g. "dangerJS", or "Danger Swift"
RuntimeName string `json:"runtimeName"`
}