8000 Add reason parameter to MergeGroupEvent by aguthrie · Pull Request #3508 · google/go-github · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add reason parameter to MergeGroupEvent #3508

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” 8000 , 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

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
< 8000 input type="checkbox" name="w" id="whitespace-cb-lg" value="1" />
Diff view
4 changes: 3 additions & 1 deletion github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,10 @@ type MergeGroup struct {
//
// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#merge_group
type MergeGroupEvent struct {
// The action that was performed. Currently, can only be checks_requested.
// The action that was performed. Possible values are: "checks_requested", "destroyed".
Action *string `json:"action,omitempty"`
// Reason is populated when the action is "destroyed". Possible values: "merged", "invalidated", "dequeued".
Reason *string `json:"reason,omitempty"`
// The merge group.
MergeGroup *MergeGroup `json:"merge_group,omitempty"`

Expand Down
2 changes: 2 additions & 0 deletions github/event_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10746,6 +10746,7 @@ func TestMergeGroupEvent_Marshal(t *testing.T) {

u := &MergeGroupEvent{
Action: Ptr("a"),
Reason: Ptr("r"),
MergeGroup: &MergeGroup{
HeadSHA: Ptr("hs"),
HeadRef: Ptr("hr"),
Expand Down Expand Up @@ -10886,6 +10887,7 @@ func TestMergeGroupEvent_Marshal(t *testing.T) {

want := `{
"action": "a",
"reason": "r",
"merge_group": {
"head_sha": "hs",
"head_ref": "hr",
Expand Down
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0