aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/xanzy/go-gitlab/pipelines.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/pipelines.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/pipelines.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go
index 5e88dad..0c736dd 100644
--- a/vendor/github.com/xanzy/go-gitlab/pipelines.go
+++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go
@@ -76,17 +76,32 @@ func (i PipelineList) String() string {
return Stringify(i)
}
+// ListProjectPipelinesOptions represents the available ListProjectPipelines() options.
+//
+// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines
+type ListProjectPipelinesOptions struct {
+ ListOptions
+ Scope *string `url:"scope,omitempty" json:"scope,omitempty"`
+ Status *BuildStateValue `url:"status,omitempty" json:"status,omitempty"`
+ Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
+ YamlErrors *bool `url:"yaml_errors,omitempty" json:"yaml_errors,omitempty"`
+ Name *string `url:"name,omitempty" json:"name,omitempty"`
+ Username *string `url:"username,omitempty" json:"username,omitempty"`
+ OrderBy *OrderByValue `url:"order_by,omitempty" json:"order_by,omitempty"`
+ Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
+}
+
// ListProjectPipelines gets a list of project piplines.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines
-func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...OptionFunc) (PipelineList, *Response, error) {
+func (s *PipelinesService) ListProjectPipelines(pid interface{}, opt *ListProjectPipelinesOptions, options ...OptionFunc) (PipelineList, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipelines", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil, options)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}