@@ -4,18 +4,18 @@ import "time"
4
4
5
5
// CheckRunPayload contains the information for GitHub's check_run hook event
6
6
type CheckRunPayload struct {
7
- Action string `json:"action"`
7
+ Action string `json:"action"`
8
8
CheckRun struct {
9
- ID int64 `json:"id"`
10
- Name string `json:"name"`
11
- HeadSHA string `json:"head_sha"`
12
- Status string `json:"status"`
13
- Conclusion string `json:"conclusion"`
14
- URL string `json:"url"`
15
- HtmlURL string `json:"html_url"`
16
- StarterAt time.Time `json:"started_at"`
17
- CompletedAt time.Time `json:"completed_at"`
18
- Output struct {
9
+ ID int64 `json:"id"`
10
+ Name string `json:"name"`
11
+ HeadSHA string `json:"head_sha"`
12
+ Status string `json:"status"`
13
+ Conclusion string `json:"conclusion"`
14
+ URL string `json:"url"`
15
+ HtmlURL string `json:"html_url"`
16
+ StarterAt time.Time `json:"started_at"`
17
+ CompletedAt time.Time `json:"completed_at"`
18
+ Output struct {
19
19
Title string `json:"title"`
20
20
Summary string `json:"summary"`
21
21
Text string `json:"text"`
@@ -32,8 +32,8 @@ type CheckRunPayload struct {
32
32
Before string `json:"before"`
33
33
After string `json:"after"`
34
34
PullRequests []PullRequestPayload `json:"pull_requests"`
35
- App struct {
36
- ID int64 `json:"id"`
35
+ App struct {
36
+ ID int64 `json:"id"`
37
37
Owner struct {
38
38
Login string `json:"login"`
39
39
ID int64 `json:"id"`
@@ -53,18 +53,18 @@ type CheckRunPayload struct {
53
53
Type string `json:"type"`
54
54
SiteAdmin bool `json:"site_admin"`
55
55
} `json:"owner"`
56
- Name string `json:"name"`
57
- Description string `json:"description"`
58
- ExternalURL string `json:"external_url"`
59
- HtmlURL string `json:"html_url"`
60
- CreatedAt string `json:"created_at"`
61
- UpdatedAt string `json:"updated_at"`
56
+ Name string `json:"name"`
57
+ Description string `json:"description"`
58
+ ExternalURL string `json:"external_url"`
59
+ HtmlURL string `json:"html_url"`
60
+ CreatedAt string `json:"created_at"`
61
+ UpdatedAt string `json:"updated_at"`
62
62
} `json:"app"`
63
- CreatedAt time.Time `json:"created_at"`
64
- UpdatedAt time.Time `json:"updated_at"`
63
+ CreatedAt time.Time `json:"created_at"`
64
+ UpdatedAt time.Time `json:"updated_at"`
65
65
} `json:"check_suite"`
66
66
App struct {
67
- ID int64 `json:"id"`
67
+ ID int64 `json:"id"`
68
68
Owner struct {
69
69
Login string `json:"login"`
70
70
ID int64 `json:"id"`
@@ -84,12 +84,12 @@ type CheckRunPayload struct {
84
84
Type string `json:"type"`
85
85
SiteAdmin bool `json:"site_admin"`
86
86
} `json:"owner"`
87
- Name string `json:"name"`
88
- Description string `json:"description"`
89
- ExternalURL string `json:"external_url"`
90
- HtmlURL string `json:"html_url"`
91
- CreatedAt string `json:"created_at"`
92
- UpdatedAt string `json:"updated_at"`
87
+ Name string `json:"name"`
88
+ Description string `json:"description"`
89
+ ExternalURL string `json:"external_url"`
90
+ HtmlURL string `json:"html_url"`
91
+ CreatedAt string `json:"created_at"`
92
+ UpdatedAt string `json:"updated_at"`
93
93
} `json:"app"`
94
94
PullRequests []PullRequestPayload `json:"pull_requests"`
95
95
} `json:"check_run"`
@@ -203,7 +203,7 @@ type CheckRunPayload struct {
203
203
204
204
// CheckSuitePayload contains the information for GitHub's check_suite hook event
205
205
type CheckSuitePayload struct {
206
- Action string `json:"action"`
206
+ Action string `json:"action"`
207
207
CheckSuite struct {
208
208
ID int64 `json:"id"`
209
209
HeadBranch string `json:"head_branch"`
@@ -214,8 +214,8 @@ type CheckSuitePayload struct {
214
214
Before string `json:"before"`
215
215
After string `json:"after"`
216
216
PullRequests []PullRequestPayload `json:"pull_requests"`
217
- App struct {
218
- ID int64 `json:"id"`
217
+ App struct {
218
+ ID int64 `json:"id"`
219
219
Owner struct {
220
220
Login string `json:"login"`
221
221
ID int64 `json:"id"`
@@ -235,23 +235,23 @@ type CheckSuitePayload struct {
235
235
Type string `json:"type"`
236
236
SiteAdmin bool `json:"site_admin"`
237
237
} `json:"owner"`
238
- Name string `json:"name"`
239
- Description string `json:"description"`
240
- ExternalURL string `json:"external_url"`
241
- HtmlURL string `json:"html_url"`
242
- CreatedAt string `json:"created_at"`
243
- UpdatedAt string `json:"updated_at"`
238
+ Name string `json:"name"`
239
+ Description string `json:"description"`
240
+ ExternalURL string `json:"external_url"`
241
+ HtmlURL string `json:"html_url"`
242
+ CreatedAt string `json:"created_at"`
243
+ UpdatedAt string `json:"updated_at"`
244
244
} `json:"app"`
245
245
CreatedAt time.Time `json:"created_at"`
246
246
UpdatedAt time.Time `json:"updated_at"`
247
247
LatestCheckRunsCount int64 `json:"latest_check_runs_count"`
248
248
CheckRunsURL string `json:"check_runs_url"`
249
- HeadCommit struct {
249
+ HeadCommit struct {
250
250
ID string `json:"id"`
251
251
TreeID string `json:"tree_id"`
252
252
Message string `json:"message"`
253
253
Timestamp time.Time `json:"timestamp"`
254
- Author struct {
254
+ Author struct {
255
255
Name string `json:"name"`
256
256
Email string `json:"email"`
257
257
} `json:"author"`
@@ -5077,6 +5077,38 @@ type RepositoryPayload struct {
5077
5077
} `json:"sender"`
5078
5078
}
5079
5079
5080
+ // SecurityAdvisoryPayload contains the information for GitHub's security_advisory hook event.
5081
+ type SecurityAdvisoryPayload struct {
5082
+ Action string `json:"action"`
5083
+ SecurityAdvisory struct {
5084
+ GHSAID string `json:"ghsa_id"`
5085
+ Summary string `json:"summary"`
5086
+ Description string `json:"description"`
5087
+ Severity string `json:"string"`
5088
+ Identifiers []struct {
5089
+ Value string `json:"value"`
5090
+ Type string `json:"type"`
5091
+ } `json:"identifiers"`
5092
+ References []struct {
5093
+ URL string `json:"url"`
5094
+ } `json:"references"`
5095
+ PublishedAt time.Time `json:"published_at"`
5096
+ UpdatedAt time.Time `json:"updated_at"`
5097
+ WithdrawnAt * time.Time `json:"withdrawn_at"`
5098
+ Vulnerabilities []struct {
5099
+ Package struct {
5100
+ Ecosystem string `json:"ecosystem"`
5101
+ Name string `json:"name"`
5102
+ }
5103
+ Severity string `json:"severity"`
5104
+ VulnerableVersionRange string `json:"vulnerable_version_range"`
5105
+ FirstPatchedVersion * struct {
5106
+ Identifier string `json:"identifier"`
5107
+ } `json:"first_patched_version"`
5108
+ } `json:"vulnerabilities"`
5109
+ } `json:"security_advisory"`
5110
+ }
5111
+
5080
5112
// StatusPayload contains the information for GitHub's status hook event
5081
5113
type StatusPayload struct {
5082
5114
ID int64 `json:"id"`
0 commit comments