Skip to content

Commit 2680886

Browse files
Kevin Mancusogmlewis
authored andcommitted
Add RequestedTeam to PullRequestEvent (#1169)
1 parent f2672b1 commit 2680886

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

github/event_types.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,14 @@ type PullRequestEvent struct {
585585
// RequestedReviewer is populated in "review_requested", "review_request_removed" event deliveries.
586586
// A request affecting multiple reviewers at once is split into multiple
587587
// such event deliveries, each with a single, different RequestedReviewer.
588-
RequestedReviewer *User `json:"requested_reviewer,omitempty"`
589-
Repo *Repository `json:"repository,omitempty"`
590-
Sender *User `json:"sender,omitempty"`
591-
Installation *Installation `json:"installation,omitempty"`
592-
Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries.
588+
RequestedReviewer *User `json:"requested_reviewer,omitempty"`
589+
// In the event that a team is requested instead of a user, "requested_team" gets sent in place of
590+
// "requested_user" with the same delivery behavior.
591+
RequestedTeam *Team `json:"requested_team,omitempty"`
592+
Repo *Repository `json:"repository,omitempty"`
593+
Sender *User `json:"sender,omitempty"`
594+
Installation *Installation `json:"installation,omitempty"`
595+
Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries.
593596

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

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.

0 commit comments

Comments
 (0)