Skip to content
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
Diff view
64 changes: 64 additions & 0 deletions github/github-accessors.go

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

76 changes: 76 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.

3 changes: 2 additions & 1 deletion github/github-stringify_test.go

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

26 changes: 26 additions & 0 deletions github/pulls.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type PullRequest struct {
Links *PRLinks `json:"_links,omitempty"`
Head *PullRequestBranch `json:"head,omitempty"`
Base *PullRequestBranch `json:"base,omitempty"`
Stack *PullRequestStack `json:"stack,omitempty"`

// ActiveLockReason is populated only when LockReason is provided while locking the pull request.
// Possible values are: "off-topic", "too heated", "resolved", and "spam".
Expand Down Expand Up @@ -123,6 +124,31 @@ type PullRequestBranch struct {
User *User `json:"user,omitempty"`
}

// PullRequestStack represents the stack a pull request belongs to, in
// repositories that use stacked pull requests. Base reports the branch the
// entire stack ultimately targets, which can differ from the pull request's own
// Base branch (the branch below it in the stack).
type PullRequestStack struct {
// Base is the base of the stack: the branch the entire stack ultimately targets.
Base *PullRequestStackBase `json:"base"`
// Size is the total number of pull requests in the stack.
Size *int `json:"size,omitempty"`
// Position is the one-based position of this pull request within the stack,
// where 1 is the bottom of the stack.
Position *int `json:"position,omitempty"`
// ID is the ID of the stack that this pull request belongs to.
ID *int64 `json:"id,omitempty"`
// Number is the number of the stack that this pull request belongs to.
Number *int `json:"number,omitempty"`
}

// PullRequestStackBase represents the base of a stacked pull request's stack:
// the branch the entire stack ultimately targets.
type PullRequestStackBase struct {
Ref string `json:"ref"`
SHA string `json:"sha"`
}

// PullRequestListOptions specifies the optional parameters to the
// PullRequestsService.List method.
type PullRequestListOptions struct {
Expand Down
Loading