Skip to content

Commit d3a1a5e

Browse files
refactor: Drop pointers from remaining ProjectV2View required fields
Per the OpenAPI schema, creator, created_at, updated_at, visible_fields, sort_by, group_by and vertical_group_by are required on the project view response, so they should be non-pointer values without omitempty (matching the convention that only optional fields are pointers). The scalar fields were already converted; this does the same for the object, timestamp and slice fields. Filter stays a pointer as it is optional. Accessors are regenerated accordingly.
1 parent 72e176b commit d3a1a5e

3 files changed

Lines changed: 17 additions & 23 deletions

File tree

github/github-accessors.go

Lines changed: 8 additions & 8 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: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/projects.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,14 @@ type ProjectV2View struct {
885885
NodeID string `json:"node_id"`
886886
ProjectURL string `json:"project_url"`
887887
HTMLURL string `json:"html_url"`
888-
Creator *User `json:"creator,omitempty"`
888+
Creator User `json:"creator"`
889889
Filter *string `json:"filter,omitempty"`
890-
VisibleFields []int64 `json:"visible_fields,omitempty"`
891-
SortBy []*ProjectV2ViewSortBy `json:"sort_by,omitempty"`
892-
GroupBy []int64 `json:"group_by,omitempty"`
893-
VerticalGroupBy []int64 `json:"vertical_group_by,omitempty"`
894-
CreatedAt *Timestamp `json:"created_at,omitempty"`
895-
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
890+
VisibleFields []int64 `json:"visible_fields"`
891+
SortBy []*ProjectV2ViewSortBy `json:"sort_by"`
892+
GroupBy []int64 `json:"group_by"`
893+
VerticalGroupBy []int64 `json:"vertical_group_by"`
894+
CreatedAt Timestamp `json:"created_at"`
895+
UpdatedAt Timestamp `json:"updated_at"`
896896
}
897897

898898
// ProjectV2ViewSortBy represents a single sort criterion of a project view.

0 commit comments

Comments
 (0)