diff options
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/commits.go | 2 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/group_boards.go | 2 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/group_milestones.go | 9 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/groups.go | 152 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/instance_clusters.go | 1 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/issues.go | 8 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/issues_statistics.go | 8 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/merge_requests.go | 123 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/milestones.go | 1 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/pipelines.go | 63 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/project_members.go | 25 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/projects.go | 68 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/registry.go | 8 | ||||
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/users.go | 1 |
14 files changed, 368 insertions, 103 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/commits.go b/vendor/github.com/xanzy/go-gitlab/commits.go index f9c6f8c9a0..c2b8dd566f 100644 --- a/vendor/github.com/xanzy/go-gitlab/commits.go +++ b/vendor/github.com/xanzy/go-gitlab/commits.go @@ -446,6 +446,8 @@ type SetCommitStatusOptions struct { Context *string `url:"context,omitempty" json:"context,omitempty"` TargetURL *string `url:"target_url,omitempty" json:"target_url,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"` + Coverage *float64 `url:"coverage,omitempty" json:"coverage,omitempty"` + PipelineID *int `url:"pipeline_id,omitempty" json:"pipeline_id,omitempty"` } // SetCommitStatus sets the status of a commit in a project. diff --git a/vendor/github.com/xanzy/go-gitlab/group_boards.go b/vendor/github.com/xanzy/go-gitlab/group_boards.go index d9d2ee6d41..86186546c7 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_boards.go +++ b/vendor/github.com/xanzy/go-gitlab/group_boards.go @@ -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"` } diff --git a/vendor/github.com/xanzy/go-gitlab/group_milestones.go b/vendor/github.com/xanzy/go-gitlab/group_milestones.go index 4cf91f944b..b3249f7b2b 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_milestones.go +++ b/vendor/github.com/xanzy/go-gitlab/group_milestones.go @@ -43,6 +43,7 @@ type GroupMilestone struct { State string `json:"state"` UpdatedAt *time.Time `json:"updated_at"` CreatedAt *time.Time `json:"created_at"` + Expired *bool `json:"expired"` } func (m GroupMilestone) String() string { @@ -56,9 +57,11 @@ func (m GroupMilestone) String() string { // https://docs.gitlab.com/ce/api/group_milestones.html#list-group-milestones type ListGroupMilestonesOptions struct { ListOptions - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` - State string `url:"state,omitempty" json:"state,omitempty"` - Search string `url:"search,omitempty" json:"search,omitempty"` + IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + State *string `url:"state,omitempty" json:"state,omitempty"` + Title *string `url:"title,omitempty" json:"title,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` + IncludeParentMilestones *bool `url:"include_parent_milestones,omitempty" json:"include_parent_milestones,omitempty"` } // ListGroupMilestones returns a list of group milestones. diff --git a/vendor/github.com/xanzy/go-gitlab/groups.go b/vendor/github.com/xanzy/go-gitlab/groups.go index 8706f6be97..1b8a0bea82 100644 --- a/vendor/github.com/xanzy/go-gitlab/groups.go +++ b/vendor/github.com/xanzy/go-gitlab/groups.go @@ -471,3 +471,155 @@ func (s *GroupsService) DeleteGroupLDAPLinkForProvider(gid interface{}, provider return s.client.Do(req, nil) } + +// GroupPushRules represents a group push rule. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#get-group-push-rules +type GroupPushRules struct { + ID int `json:"id"` + CreatedAt *time.Time `json:"created_at"` + CommitMessageRegex string `json:"commit_message_regex"` + CommitMessageNegativeRegex string `json:"commit_message_negative_regex"` + BranchNameRegex string `json:"branch_name_regex"` + DenyDeleteTag bool `json:"deny_delete_tag"` + MemberCheck bool `json:"member_check"` + PreventSecrets bool `json:"prevent_secrets"` + AuthorEmailRegex string `json:"author_email_regex"` + FileNameRegex string `json:"file_name_regex"` + MaxFileSize int `json:"max_file_size"` + CommitCommitterCheck bool `json:"commit_committer_check"` + RejectUnsignedCommits bool `json:"reject_unsigned_commits"` +} + +// GetGroupPushRules gets the push rules of a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#get-group-push-rules +func (s *GroupsService) GetGroupPushRules(gid interface{}, options ...RequestOptionFunc) (*GroupPushRules, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group)) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + gpr := new(GroupPushRules) + resp, err := s.client.Do(req, gpr) + if err != nil { + return nil, resp, err + } + + return gpr, resp, err +} + +// AddGroupPushRuleOptions represents the available AddGroupPushRule() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#add-group-push-rule +type AddGroupPushRuleOptions struct { + DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` + MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` + PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` + CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` + CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"` + BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` + AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` + FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` + MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` + CommitCommitterCheck *bool `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"` + RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"` +} + +// AddGroupPushRule adds push rules to the specified group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#add-group-push-rule +func (s *GroupsService) AddGroupPushRule(gid interface{}, opt *AddGroupPushRuleOptions, options ...RequestOptionFunc) (*GroupPushRules, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group)) + + req, err := s.client.NewRequest("POST", u, opt, options) + if err != nil { + return nil, nil, err + } + + gpr := new(GroupPushRules) + resp, err := s.client.Do(req, gpr) + if err != nil { + return nil, resp, err + } + + return gpr, resp, err +} + +// EditGroupPushRuleOptions represents the available EditGroupPushRule() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#edit-group-push-rule +type EditGroupPushRuleOptions struct { + DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` + MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` + PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` + CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` + CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"` + BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` + AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` + FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` + MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` + CommitCommitterCheck *bool `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"` + RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"` +} + +// EditGroupPushRule edits a push rule for a specified group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#edit-group-push-rule +func (s *GroupsService) EditGroupPushRule(gid interface{}, opt *EditGroupPushRuleOptions, options ...RequestOptionFunc) (*GroupPushRules, *Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group)) + + req, err := s.client.NewRequest("PUT", u, opt, options) + if err != nil { + return nil, nil, err + } + + gpr := new(GroupPushRules) + resp, err := s.client.Do(req, gpr) + if err != nil { + return nil, resp, err + } + + return gpr, resp, err +} + +// DeleteGroupPushRule deletes the push rules of a group. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/groups.html#delete-group-push-rule +func (s *GroupsService) DeleteGroupPushRule(gid interface{}, options ...RequestOptionFunc) (*Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("groups/%s/push_rule", pathEscape(group)) + + req, err := s.client.NewRequest("DELETE", u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/instance_clusters.go b/vendor/github.com/xanzy/go-gitlab/instance_clusters.go index 4156854304..e646cc89a4 100644 --- a/vendor/github.com/xanzy/go-gitlab/instance_clusters.go +++ b/vendor/github.com/xanzy/go-gitlab/instance_clusters.go @@ -37,6 +37,7 @@ type InstanceCluster struct { ID int `json:"id"` Name string `json:"name"` Domain string `json:"domain"` + Managed bool `json:"managed"` CreatedAt *time.Time `json:"created_at"` ProviderType string `json:"provider_type"` PlatformType string `json:"platform_type"` diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go index 30eae41d3a..4670b3cb54 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues.go +++ b/vendor/github.com/xanzy/go-gitlab/issues.go @@ -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"` @@ -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"` diff --git a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go index 0f61c3f0b0..990544adb5 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go +++ b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go @@ -51,8 +51,8 @@ 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"` - Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"` + Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` + Milestone *string `url:"milestone,omitempty" json:"milestone,omitempty"` Scope *string `url:"scope,omitempty" json:"scope,omitempty"` AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` AuthorUsername *string `url:"author_username,omitempty" json:"author_username,omitempty"` @@ -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"` @@ -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"` diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/github.com/xanzy/go-gitlab/merge_requests.go index 5bc845eda6..c2cc618325 100644 --- a/vendor/github.com/xanzy/go-gitlab/merge_requests.go +++ b/vendor/github.com/xanzy/go-gitlab/merge_requests.go @@ -133,25 +133,28 @@ func (m MergeRequestDiffVersion) String() string { // https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests type ListMergeRequestsOptions struct { ListOptions - State *string `url:"state,omitempty" json:"state,omitempty"` - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - 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,comma,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"` - UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` - Scope *string `url:"scope,omitempty" json:"scope,omitempty"` - AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` - AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` - MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` - SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` - TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` - Search *string `url:"search,omitempty" json:"search,omitempty"` - In *string `url:"in,omitempty" json:"in,omitempty"` - WIP *string `url:"wip,omitempty" json:"wip,omitempty"` + State *string `url:"state,omitempty" json:"state,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + 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,comma,omitempty" json:"labels,omitempty"` + NotLabels Labels `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"` + WithLabelsDetails *bool `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"` + WithMergeStatusRecheck *bool `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,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"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` + Scope *string `url:"scope,omitempty" json:"scope,omitempty"` + AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` + AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` + MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` + In *string `url:"in,omitempty" json:"in,omitempty"` + WIP *string `url:"wip,omitempty" json:"wip,omitempty"` } // ListMergeRequests gets all merge requests. The state parameter can be used @@ -183,23 +186,26 @@ func (s *MergeRequestsService) ListMergeRequests(opt *ListMergeRequestsOptions, // https://docs.gitlab.com/ce/api/merge_requests.html#list-group-merge-requests type ListGroupMergeRequestsOptions struct { ListOptions - State *string `url:"state,omitempty" json:"state,omitempty"` - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - 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"` - 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"` - UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` - Scope *string `url:"scope,omitempty" json:"scope,omitempty"` - AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` - AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` - MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` - SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` - TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` - Search *string `url:"search,omitempty" json:"search,omitempty"` + State *string `url:"state,omitempty" json:"state,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + 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"` + NotLabels Labels `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"` + WithLabelsDetails *bool `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"` + WithMergeStatusRecheck *bool `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,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"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` + Scope *string `url:"scope,omitempty" json:"scope,omitempty"` + AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` + AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` + MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` } // ListGroupMergeRequests gets all merge requests for this group. @@ -234,25 +240,28 @@ func (s *MergeRequestsService) ListGroupMergeRequests(gid interface{}, opt *List // https://docs.gitlab.com/ce/api/merge_requests.html#list-project-merge-requests type ListProjectMergeRequestsOptions struct { ListOptions - IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` - State *string `url:"state,omitempty" json:"state,omitempty"` - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - 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,comma,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"` - UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` - Scope *string `url:"scope,omitempty" json:"scope,omitempty"` - AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` - AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` - MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` - SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` - TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` - Search *string `url:"search,omitempty" json:"search,omitempty"` - WIP *string `url:"wip,omitempty" json:"wip,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` + State *string `url:"state,omitempty" json:"state,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + 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,comma,omitempty" json:"labels,omitempty"` + NotLabels Labels `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"` + WithLabelsDetails *bool `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"` + WithMergeStatusRecheck *bool `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,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"` + UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` + Scope *string `url:"scope,omitempty" json:"scope,omitempty"` + AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` + AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` + MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` + SourceBranch *string `url:"source_branch,omitempty" json:"source_branch,omitempty"` + TargetBranch *string `url:"target_branch,omitempty" json:"target_branch,omitempty"` + Search *string `url:"search,omitempty" json:"search,omitempty"` + WIP *string `url:"wip,omitempty" json:"wip,omitempty"` } // ListProjectMergeRequests gets all merge requests for this project. @@ -517,7 +526,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"` @@ -563,7 +572,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"` diff --git a/vendor/github.com/xanzy/go-gitlab/milestones.go b/vendor/github.com/xanzy/go-gitlab/milestones.go index eb3e3a3028..3d881d51aa 100644 --- a/vendor/github.com/xanzy/go-gitlab/milestones.go +++ b/vendor/github.com/xanzy/go-gitlab/milestones.go @@ -44,6 +44,7 @@ type Milestone struct { WebURL string `json:"web_url"` UpdatedAt *time.Time `json:"updated_at"` CreatedAt *time.Time `json:"created_at"` + Expired *bool `json:"expired"` } func (m Milestone) String() string { diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go index 5ab5fe1bfd..1f1ab28525 100644 --- a/vendor/github.com/xanzy/go-gitlab/pipelines.go +++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go @@ -61,7 +61,7 @@ type Pipeline struct { DetailedStatus *DetailedStatus `json:"detailed_status"` } -// DetailedStatus contains detailed information about the status of a pipeline +// DetailedStatus contains detailed information about the status of a pipeline. type DetailedStatus struct { Icon string `json:"icon"` Text string `json:"text"` @@ -80,6 +80,43 @@ func (p Pipeline) String() string { return Stringify(p) } +// PipelineTestReport contains a detailed report of a test run. +type PipelineTestReport struct { + TotalTime int `json:"total_time"` + TotalCount int `json:"total_count"` + SuccessCount int `json:"success_count"` + FailedCount int `json:"failed_count"` + SkippedCount int `json:"skipped_count"` + ErrorCount int `json:"error_count"` + TestSuites []PipelineTestSuites `json:"test_suites"` +} + +// PipelineTestSuites contains test suites results. +type PipelineTestSuites struct { + Name string `json:"name"` + TotalTime int `json:"total_time"` + TotalCount int `json:"total_count"` + SuccessCount int `json:"success_count"` + FailedCount int `json:"failed_count"` + SkippedCount int `json:"skipped_count"` + ErrorCount int `json:"error_count"` + TestCases []PipelineTestCases `json:"test_cases"` +} + +// PipelineTestCases contains test cases details. +type PipelineTestCases struct { + Status string `json:"status"` + Name string `json:"name"` + Classname string `json:"classname"` + ExecutionTime int `json:"execution_time"` + SystemOutput string `json:"system_output"` + StackTrace string `json:"stack_trace"` +} + +func (p PipelineTestReport) String() string { + return Stringify(p) +} + // PipelineInfo shows the basic entities of a pipeline, mostly used as fields // on other assets, like Commit. type PipelineInfo struct { @@ -186,6 +223,30 @@ func (s *PipelinesService) GetPipelineVariables(pid interface{}, pipeline int, o return p, resp, err } +// GetPipelineTestReport gets the test report of a single project pipeline. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html#get-a-pipelines-test-report +func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int) (*PipelineTestReport, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/pipelines/%d/test_report", pathEscape(project), pipeline) + + req, err := s.client.NewRequest("GET", u, nil, nil) + if err != nil { + return nil, nil, err + } + + p := new(PipelineTestReport) + resp, err := s.client.Do(req, p) + if err != nil { + return nil, resp, err + } + + return p, resp, err +} + // CreatePipelineOptions represents the available CreatePipeline() options. // // GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline diff --git a/vendor/github.com/xanzy/go-gitlab/project_members.go b/vendor/github.com/xanzy/go-gitlab/project_members.go index 0b4167820e..0a1b57f763 100644 --- a/vendor/github.com/xanzy/go-gitlab/project_members.go +++ b/vendor/github.com/xanzy/go-gitlab/project_members.go @@ -117,6 +117,31 @@ func (s *ProjectMembersService) GetProjectMember(pid interface{}, user int, opti return pm, resp, err } +// GetInheritedProjectMember gets a project team member, including inherited +// +// GitLab API docs: +// https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project-including-inherited-members +func (s *ProjectMembersService) GetInheritedProjectMember(pid interface{}, user int, options ...RequestOptionFunc) (*ProjectMember, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/members/all/%d", pathEscape(project), user) + + req, err := s.client.NewRequest("GET", u, nil, options) + if err != nil { + return nil, nil, err + } + + pm := new(ProjectMember) + resp, err := s.client.Do(req, pm) + if err != nil { + return nil, resp, err + } + + return pm, resp, err +} + // AddProjectMemberOptions represents the available AddProjectMember() options. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go index cc1ba79c88..6622444cb6 100644 --- a/vendor/github.com/xanzy/go-gitlab/projects.go +++ b/vendor/github.com/xanzy/go-gitlab/projects.go @@ -89,6 +89,7 @@ type Project struct { MirrorTriggerBuilds bool `json:"mirror_trigger_builds"` OnlyMirrorProtectedBranches bool `json:"only_mirror_protected_branches"` MirrorOverwritesDivergedBranches bool `json:"mirror_overwrites_diverged_branches"` + PackagesEnabled bool `json:"packages_enabled"` ServiceDeskEnabled bool `json:"service_desk_enabled"` ServiceDeskAddress string `json:"service_desk_address"` IssuesAccessLevel AccessControlValue `json:"issues_access_level"` @@ -1190,19 +1191,20 @@ func (s *ProjectsService) ListProjectForks(pid interface{}, opt *ListProjectsOpt // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#push-rules type ProjectPushRules struct { - ID int `json:"id"` - ProjectID int `json:"project_id"` - CommitMessageRegex string `json:"commit_message_regex"` - BranchNameRegex string `json:"branch_name_regex"` - DenyDeleteTag bool `json:"deny_delete_tag"` - CreatedAt *time.Time `json:"created_at"` - MemberCheck bool `json:"member_check"` - PreventSecrets bool `json:"prevent_secrets"` - AuthorEmailRegex string `json:"author_email_regex"` - FileNameRegex string `json:"file_name_regex"` - MaxFileSize int `json:"max_file_size"` - CommitCommitterCheck bool `json:"commit_committer_check"` - RejectUnsignedCommits bool `json:"reject_unsigned_commits"` + ID int `json:"id"` + ProjectID int `json:"project_id"` + CommitMessageRegex string `json:"commit_message_regex"` + CommitMessageNegativeRegex string `json:"commit_message_negative_regex"` + BranchNameRegex string `json:"branch_name_regex"` + DenyDeleteTag bool `json:"deny_delete_tag"` + CreatedAt *time.Time `json:"created_at"` + MemberCheck bool `json:"member_check"` + PreventSecrets bool `json:"prevent_secrets"` + AuthorEmailRegex string `json:"author_email_regex"` + FileNameRegex string `json:"file_name_regex"` + MaxFileSize int `json:"max_file_size"` + CommitCommitterCheck bool `json:"commit_committer_check"` + RejectUnsignedCommits bool `json:"reject_unsigned_commits"` } // GetProjectPushRules gets the push rules of a project. @@ -1236,14 +1238,17 @@ func (s *ProjectsService) GetProjectPushRules(pid interface{}, options ...Reques // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule type AddProjectPushRuleOptions struct { - DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` - MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` - PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` - CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` - BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` - AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` - FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` - MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` + DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` + MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` + PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` + CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` + CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"` + BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` + AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` + FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` + MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` + CommitCommitterCheck *bool `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"` + RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"` } // AddProjectPushRule adds a push rule to a specified project. @@ -1277,16 +1282,17 @@ func (s *ProjectsService) AddProjectPushRule(pid interface{}, opt *AddProjectPus // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#edit-project-push-rule type EditProjectPushRuleOptions struct { - AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` - BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` - CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` - FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` - DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` - MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` - PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` - MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` - CommitCommitterCheck *bool `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"` - RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"` + AuthorEmailRegex *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"` + BranchNameRegex *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"` + CommitMessageRegex *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"` + CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"` + FileNameRegex *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"` + DenyDeleteTag *bool `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"` + MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"` + PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"` + MaxFileSize *int `url:"max_file_size,omitempty" json:"max_file_size,omitempty"` + CommitCommitterCheck *bool `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"` + RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"` } // EditProjectPushRule edits a push rule for a specified project. diff --git a/vendor/github.com/xanzy/go-gitlab/registry.go b/vendor/github.com/xanzy/go-gitlab/registry.go index 57f4575001..8694cf94a8 100644 --- a/vendor/github.com/xanzy/go-gitlab/registry.go +++ b/vendor/github.com/xanzy/go-gitlab/registry.go @@ -190,9 +190,13 @@ func (s *ContainerRegistryService) DeleteRegistryRepositoryTag(pid interface{}, // GitLab API docs: // https://docs.gitlab.com/ee/api/container_registry.html#delete-repository-tags-in-bulk type DeleteRegistryRepositoryTagsOptions struct { + NameRegexpDelete *string `url:"name_regex_delete,omitempty" json:"name_regex_delete,omitempty"` + NameRegexpKeep *string `url:"name_regex_keep,omitempty" json:"name_regex_keep,omitempty"` + KeepN *int `url:"keep_n,omitempty" json:"keep_n,omitempty"` + OlderThan *string `url:"older_than,omitempty" json:"older_than,omitempty"` + + // Deprecated members NameRegexp *string `url:"name_regex,omitempty" json:"name_regex,omitempty"` - KeepN *int `url:"keep_n,omitempty" json:"keep_n,omitempty"` - OlderThan *string `url:"older_than,omitempty" json:"older_than,omitempty"` } // DeleteRegistryRepositoryTags deletes repository tags in bulk based on diff --git a/vendor/github.com/xanzy/go-gitlab/users.go b/vendor/github.com/xanzy/go-gitlab/users.go index 2b5a99239b..9a220b8474 100644 --- a/vendor/github.com/xanzy/go-gitlab/users.go +++ b/vendor/github.com/xanzy/go-gitlab/users.go @@ -59,6 +59,7 @@ type User struct { Email string `json:"email"` Name string `json:"name"` State string `json:"state"` + WebURL string `json:"web_url"` CreatedAt *time.Time `json:"created_at"` Bio string `json:"bio"` Location string `json:"location"` |