Skip to content

Commit 5cf155c

Browse files
authored
Add reason field to PullRequestEvent (#3730)
1 parent 4756394 commit 5cf155c

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

github/event_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,8 @@ type PullRequestEvent struct {
12371237
Repo *Repository `json:"repository,omitempty"`
12381238
Sender *User `json:"sender,omitempty"`
12391239
Installation *Installation `json:"installation,omitempty"`
1240-
Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries.
1240+
Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries.
1241+
Reason *string `json:"reason,omitempty"` // Populated in "dequeued" event deliveries.
12411242

12421243
// The following field is only present when the webhook is triggered on
12431244
// a repository belonging to an organization.

github/event_types_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16079,6 +16079,7 @@ func TestPullRequestEvent_Marshal(t *testing.T) {
1607916079
},
1608016080
RequestedTeam: &Team{ID: Ptr(int64(1))},
1608116081
Label: &Label{ID: Ptr(int64(1))},
16082+
Reason: Ptr("CI_FAILURE"),
1608216083
Before: Ptr("before"),
1608316084
After: Ptr("after"),
1608416085
Repo: &Repository{
@@ -16268,6 +16269,7 @@ func TestPullRequestEvent_Marshal(t *testing.T) {
1626816269
"label": {
1626916270
"id": 1
1627016271
},
16272+
"reason": "CI_FAILURE",
1627116273
"before": "before",
1627216274
"after": "after",
1627316275
"repository": {

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)