Skip to content

Commit 8a800cc

Browse files
authored
Add new fields for IssueType (#3451)
1 parent fb972ef commit 8a800cc

File tree

4 files changed

+164
-1
lines changed

4 files changed

+164
-1
lines changed

github/github-accessors.go

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-stringify_test.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/issues.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type Issue struct {
5555
Assignees []*User `json:"assignees,omitempty"`
5656
NodeID *string `json:"node_id,omitempty"`
5757
Draft *bool `json:"draft,omitempty"`
58+
Type *IssueType `json:"type,omitempty"`
5859

5960
// TextMatches is only populated from search results that request text matches
6061
// See: search.go and https://docs.github.com/rest/search/#text-match-metadata
@@ -129,6 +130,18 @@ type PullRequestLinks struct {
129130
MergedAt *Timestamp `json:"merged_at,omitempty"`
130131
}
131132

133+
// IssueType represents the type of issue.
134+
// For now it shows up when receiveing an Issue event.
135+
type IssueType struct {
136+
ID *int64 `json:"id,omitempty"`
137+
NodeID *string `json:"node_id,omitempty"`
138+
Name *string `json:"name,omitempty"`
139+
Description *string `json:"description,omitempty"`
140+
Color *string `json:"color,omitempty"`
141+
CreatedAt *Timestamp `json:"created_at,omitempty"`
142+
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
143+
}
144+
132145
// List the issues for the authenticated user. If all is true, list issues
133146
// across all the user's visible repositories including owned, member, and
134147
// organization repositories; if false, list only owned and member

0 commit comments

Comments
 (0)