@@ -18,50 +18,59 @@ import (
1818// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/pulls/
1919type PullRequestsService service
2020
21+ // PullRequestAutoMerge represents the "auto_merge" response for a PullRequest.
22+ type PullRequestAutoMerge struct {
23+ EnabledBy * User `json:"enabled_by,omitempty"`
24+ MergeMethod * string `json:"merge_method,omitempty"`
25+ CommitTitle * string `json:"commit_title,omitempty"`
26+ CommitMessage * string `json:"commit_message,omitempty"`
27+ }
28+
2129// PullRequest represents a GitHub pull request on a repository.
2230type PullRequest struct {
23- ID * int64 `json:"id,omitempty"`
24- Number * int `json:"number,omitempty"`
25- State * string `json:"state,omitempty"`
26- Locked * bool `json:"locked,omitempty"`
27- Title * string `json:"title,omitempty"`
28- Body * string `json:"body,omitempty"`
29- CreatedAt * time.Time `json:"created_at,omitempty"`
30- UpdatedAt * time.Time `json:"updated_at,omitempty"`
31- ClosedAt * time.Time `json:"closed_at,omitempty"`
32- MergedAt * time.Time `json:"merged_at,omitempty"`
33- Labels []* Label `json:"labels,omitempty"`
34- User * User `json:"user,omitempty"`
35- Draft * bool `json:"draft,omitempty"`
36- Merged * bool `json:"merged,omitempty"`
37- Mergeable * bool `json:"mergeable,omitempty"`
38- MergeableState * string `json:"mergeable_state,omitempty"`
39- MergedBy * User `json:"merged_by,omitempty"`
40- MergeCommitSHA * string `json:"merge_commit_sha,omitempty"`
41- Rebaseable * bool `json:"rebaseable,omitempty"`
42- Comments * int `json:"comments,omitempty"`
43- Commits * int `json:"commits,omitempty"`
44- Additions * int `json:"additions,omitempty"`
45- Deletions * int `json:"deletions,omitempty"`
46- ChangedFiles * int `json:"changed_files,omitempty"`
47- URL * string `json:"url,omitempty"`
48- HTMLURL * string `json:"html_url,omitempty"`
49- IssueURL * string `json:"issue_url,omitempty"`
50- StatusesURL * string `json:"statuses_url,omitempty"`
51- DiffURL * string `json:"diff_url,omitempty"`
52- PatchURL * string `json:"patch_url,omitempty"`
53- CommitsURL * string `json:"commits_url,omitempty"`
54- CommentsURL * string `json:"comments_url,omitempty"`
55- ReviewCommentsURL * string `json:"review_comments_url,omitempty"`
56- ReviewCommentURL * string `json:"review_comment_url,omitempty"`
57- ReviewComments * int `json:"review_comments,omitempty"`
58- Assignee * User `json:"assignee,omitempty"`
59- Assignees []* User `json:"assignees,omitempty"`
60- Milestone * Milestone `json:"milestone,omitempty"`
61- MaintainerCanModify * bool `json:"maintainer_can_modify,omitempty"`
62- AuthorAssociation * string `json:"author_association,omitempty"`
63- NodeID * string `json:"node_id,omitempty"`
64- RequestedReviewers []* User `json:"requested_reviewers,omitempty"`
31+ ID * int64 `json:"id,omitempty"`
32+ Number * int `json:"number,omitempty"`
33+ State * string `json:"state,omitempty"`
34+ Locked * bool `json:"locked,omitempty"`
35+ Title * string `json:"title,omitempty"`
36+ Body * string `json:"body,omitempty"`
37+ CreatedAt * time.Time `json:"created_at,omitempty"`
38+ UpdatedAt * time.Time `json:"updated_at,omitempty"`
39+ ClosedAt * time.Time `json:"closed_at,omitempty"`
40+ MergedAt * time.Time `json:"merged_at,omitempty"`
41+ Labels []* Label `json:"labels,omitempty"`
42+ User * User `json:"user,omitempty"`
43+ Draft * bool `json:"draft,omitempty"`
44+ Merged * bool `json:"merged,omitempty"`
45+ Mergeable * bool `json:"mergeable,omitempty"`
46+ MergeableState * string `json:"mergeable_state,omitempty"`
47+ MergedBy * User `json:"merged_by,omitempty"`
48+ MergeCommitSHA * string `json:"merge_commit_sha,omitempty"`
49+ Rebaseable * bool `json:"rebaseable,omitempty"`
50+ Comments * int `json:"comments,omitempty"`
51+ Commits * int `json:"commits,omitempty"`
52+ Additions * int `json:"additions,omitempty"`
53+ Deletions * int `json:"deletions,omitempty"`
54+ ChangedFiles * int `json:"changed_files,omitempty"`
55+ URL * string `json:"url,omitempty"`
56+ HTMLURL * string `json:"html_url,omitempty"`
57+ IssueURL * string `json:"issue_url,omitempty"`
58+ StatusesURL * string `json:"statuses_url,omitempty"`
59+ DiffURL * string `json:"diff_url,omitempty"`
60+ PatchURL * string `json:"patch_url,omitempty"`
61+ CommitsURL * string `json:"commits_url,omitempty"`
62+ CommentsURL * string `json:"comments_url,omitempty"`
63+ ReviewCommentsURL * string `json:"review_comments_url,omitempty"`
64+ ReviewCommentURL * string `json:"review_comment_url,omitempty"`
65+ ReviewComments * int `json:"review_comments,omitempty"`
66+ Assignee * User `json:"assignee,omitempty"`
67+ Assignees []* User `json:"assignees,omitempty"`
68+ Milestone * Milestone `json:"milestone,omitempty"`
69+ MaintainerCanModify * bool `json:"maintainer_can_modify,omitempty"`
70+ AuthorAssociation * string `json:"author_association,omitempty"`
71+ NodeID * string `json:"node_id,omitempty"`
72+ RequestedReviewers []* User `json:"requested_reviewers,omitempty"`
73+ AutoMerge * PullRequestAutoMerge `json:"auto_merge,omitempty"`
6574
6675 // RequestedTeams is populated as part of the PullRequestEvent.
6776 // See, https://docs.github.com/en/developers/webhooks-and-events/github-event-types#pullrequestevent for an example.
0 commit comments