Skip to content

Commit

Permalink
IssuesService.Edit: add state_reason
Browse files Browse the repository at this point in the history
state_reason can be 'completed' or 'not_planned'.
  • Loading branch information
parkr committed Jun 24, 2022
1 parent 8309da1 commit 879d435
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
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.

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

16 changes: 9 additions & 7 deletions github/issues.go
Expand Up @@ -77,13 +77,15 @@ func (i Issue) IsPullRequest() bool {
// It is separate from Issue above because otherwise Labels
// and Assignee fail to serialize to the correct JSON.
type IssueRequest struct {
Title *string `json:"title,omitempty"`
Body *string `json:"body,omitempty"`
Labels *[]string `json:"labels,omitempty"`
Assignee *string `json:"assignee,omitempty"`
State *string `json:"state,omitempty"`
Milestone *int `json:"milestone,omitempty"`
Assignees *[]string `json:"assignees,omitempty"`
Title *string `json:"title,omitempty"`
Body *string `json:"body,omitempty"`
Labels *[]string `json:"labels,omitempty"`
Assignee *string `json:"assignee,omitempty"`
State *string `json:"state,omitempty"`
// StateReason can be 'completed' or 'not_planned'.
StateReason *string `json:"state_reason,omitempty"`
Milestone *int `json:"milestone,omitempty"`
Assignees *[]string `json:"assignees,omitempty"`
}

// IssueListOptions specifies the optional parameters to the IssuesService.List
Expand Down

0 comments on commit 879d435

Please sign in to comment.