Skip to content

Commit

Permalink
Make sure Labels is never a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Sep 2, 2020
1 parent a1037cd commit 5b17367
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion group_boards.go
Expand Up @@ -144,7 +144,7 @@ type UpdateGroupIssueBoardOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,omitempty" json:"labels,omitempty"`
Weight *int `url:"weight,omitempty" json:"weight,omitempty"`
}

Expand Down
8 changes: 4 additions & 4 deletions issues.go
Expand Up @@ -390,7 +390,7 @@ type CreateIssueOptions struct {
Confidential *bool `url:"confidential,omitempty" json:"confidential,omitempty"`
AssigneeIDs []int `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
Labels *Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
MergeRequestToResolveDiscussionsOf *int `url:"merge_request_to_resolve_discussions_of,omitempty" json:"merge_request_to_resolve_discussions_of,omitempty"`
Expand Down Expand Up @@ -431,9 +431,9 @@ type UpdateIssueOptions struct {
Confidential *bool `url:"confidential,omitempty" json:"confidential,omitempty"`
AssigneeIDs []int `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
Labels *Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
AddLabels *Labels `url:"add_labels,comma,omitempty" json:"add_labels,omitempty"`
RemoveLabels *Labels `url:"remove_labels,comma,omitempty" json:"remove_labels,omitempty"`
Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
AddLabels Labels `url:"add_labels,comma,omitempty" json:"add_labels,omitempty"`
RemoveLabels Labels `url:"remove_labels,comma,omitempty" json:"remove_labels,omitempty"`
StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"`
UpdatedAt *time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"`
DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions issues_statistics.go
Expand Up @@ -51,7 +51,7 @@ func (n IssuesStatistics) String() string {
// GitLab API docs:
// https://docs.gitlab.com/ee/api/issues_statistics.html#get-issues-statistics
type GetIssuesStatisticsOptions struct {
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,omitempty" json:"labels,omitempty"`
Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
Scope *string `url:"scope,omitempty" json:"scope,omitempty"`
AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"`
Expand Down Expand Up @@ -95,7 +95,7 @@ func (s *IssuesStatisticsService) GetIssuesStatistics(opt *GetIssuesStatisticsOp
// GitLab API docs:
// https://docs.gitlab.com/ee/api/issues_statistics.html#get-group-issues-statistics
type GetGroupIssuesStatisticsOptions struct {
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,omitempty" json:"labels,omitempty"`
IIDs []int `url:"iids,omitempty" json:"iids,omitempty"`
Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
Scope *string `url:"scope,omitempty" json:"scope,omitempty"`
Expand Down Expand Up @@ -144,7 +144,7 @@ func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt
// https://docs.gitlab.com/ee/api/issues_statistics.html#get-project-issues-statistics
type GetProjectIssuesStatisticsOptions struct {
IIDs []int `url:"iids,omitempty" json:"iids,omitempty"`
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,omitempty" json:"labels,omitempty"`
Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
Scope *string `url:"scope,omitempty" json:"scope,omitempty"`
AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions merge_requests.go
Expand Up @@ -188,7 +188,7 @@ type ListGroupMergeRequestsOptions struct {
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
Milestone *string `url:"milestone,omitempty" json:"milestone,omitempty"`
View *string `url:"view,omitempty" json:"view,omitempty"`
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,omitempty" json:"labels,omitempty"`
CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
Expand Down Expand Up @@ -517,7 +517,7 @@ type CreateMergeRequestOptions struct {
Description *string `url:"description,omitempty" json:"description,omitempty"`
SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"`
TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"`
Labels *Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
AssigneeIDs []int `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
TargetProjectID *int `url:"target_project_id,omitempty" json:"target_project_id,omitempty"`
Expand Down Expand Up @@ -563,7 +563,7 @@ type UpdateMergeRequestOptions struct {
TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"`
AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
AssigneeIDs []int `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
Labels *Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
StateEvent *string `url:"state_event,omitempty" json:"state_event,omitempty"`
RemoveSourceBranch *bool `url:"remove_source_branch,omitempty" json:"remove_source_branch,omitempty"`
Expand Down

0 comments on commit 5b17367

Please sign in to comment.