Skip to content

Commit 1a62b53

Browse files
committed
docs: add clarifications for mergeable field in pull requests
1 parent 3424b98 commit 1a62b53

File tree

1 file changed

+57
-43
lines changed

1 file changed

+57
-43
lines changed

github/pulls.go

+57-43
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,63 @@ type PullRequestAutoMerge struct {
2828

2929
// PullRequest represents a GitHub pull request on a repository.
3030
type PullRequest struct {
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 *Timestamp `json:"created_at,omitempty"`
38-
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
39-
ClosedAt *Timestamp `json:"closed_at,omitempty"`
40-
MergedAt *Timestamp `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"`
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 *Timestamp `json:"created_at,omitempty"`
38+
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
39+
ClosedAt *Timestamp `json:"closed_at,omitempty"`
40+
MergedAt *Timestamp `json:"merged_at,omitempty"`
41+
Labels []*Label `json:"labels,omitempty"`
42+
User *User `json:"user,omitempty"`
43+
Draft *bool `json:"draft,omitempty"`
44+
URL *string `json:"url,omitempty"`
45+
HTMLURL *string `json:"html_url,omitempty"`
46+
IssueURL *string `json:"issue_url,omitempty"`
47+
StatusesURL *string `json:"statuses_url,omitempty"`
48+
DiffURL *string `json:"diff_url,omitempty"`
49+
PatchURL *string `json:"patch_url,omitempty"`
50+
CommitsURL *string `json:"commits_url,omitempty"`
51+
CommentsURL *string `json:"comments_url,omitempty"`
52+
ReviewCommentsURL *string `json:"review_comments_url,omitempty"`
53+
ReviewCommentURL *string `json:"review_comment_url,omitempty"`
54+
Assignee *User `json:"assignee,omitempty"`
55+
Assignees []*User `json:"assignees,omitempty"`
56+
Milestone *Milestone `json:"milestone,omitempty"`
57+
AuthorAssociation *string `json:"author_association,omitempty"`
58+
NodeID *string `json:"node_id,omitempty"`
59+
RequestedReviewers []*User `json:"requested_reviewers,omitempty"`
60+
AutoMerge *PullRequestAutoMerge `json:"auto_merge,omitempty"`
61+
62+
// Merged is not populated by List operation.
63+
Merged *bool `json:"merged,omitempty"`
64+
// Mergeable is not populated by List operation.
65+
Mergeable *bool `json:"mergeable,omitempty"`
66+
// MergeableState is not populated by List operation.
67+
MergeableState *string `json:"mergeable_state,omitempty"`
68+
// Rebaseable is not populated by List operation.
69+
Rebaseable *bool `json:"rebaseable,omitempty"`
70+
// MergedBy is not populated by List operation.
71+
MergedBy *User `json:"merged_by,omitempty"`
72+
// MergeCommitSHA is not populated by List operation.
73+
MergeCommitSHA *string `json:"merge_commit_sha,omitempty"`
74+
// Comments is not populated by List operation.
75+
Comments *int `json:"comments,omitempty"`
76+
// Commits is not populated by List operation.
77+
Commits *int `json:"commits,omitempty"`
78+
// Additions are not populated by List operation.
79+
Additions *int `json:"additions,omitempty"`
80+
// Deletions are not populated by List operation.
81+
Deletions *int `json:"deletions,omitempty"`
82+
// ChangedFiles is not populated by List operation.
83+
ChangedFiles *int `json:"changed_files,omitempty"`
84+
// MaintainerCanModify is not populated by List operation.
85+
MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"`
86+
// ReviewComments is not populated by List operation.
87+
ReviewComments *int `json:"review_comments,omitempty"`
7488

7589
// RequestedTeams is populated as part of the PullRequestEvent.
7690
// See, https://docs.github.com/developers/webhooks-and-events/github-event-types#pullrequestevent for an example.

0 commit comments

Comments
 (0)