From 969deb7483be5746c29db4cdae00e6adfa142e00 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Sat, 2 Dec 2017 00:23:22 +0800 Subject: [PATCH] Add AuthorAssociation field in struct PullRequest Signed-off-by: Allen Sun --- github/github-accessors.go | 8 ++++++++ github/pulls.go | 1 + 2 files changed, 9 insertions(+) diff --git a/github/github-accessors.go b/github/github-accessors.go index 25ea648c80d..4b9d62b0964 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -5812,6 +5812,14 @@ func (p *PullRequest) GetAssignee() *User { return p.Assignee } +// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetAuthorAssociation() string { + if p == nil || p.AuthorAssociation == nil { + return "" + } + return *p.AuthorAssociation +} + // GetBase returns the Base field. func (p *PullRequest) GetBase() *PullRequestBranch { if p == nil { diff --git a/github/pulls.go b/github/pulls.go index 6681c8b21b0..5b6b5ee844f 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -51,6 +51,7 @@ type PullRequest struct { Assignees []*User `json:"assignees,omitempty"` Milestone *Milestone `json:"milestone,omitempty"` MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` + AuthorAssociation *string `json:"author_association,omitempty"` Head *PullRequestBranch `json:"head,omitempty"` Base *PullRequestBranch `json:"base,omitempty"`