summaryrefslogtreecommitdiff
path: root/lib/api/pipelines.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-03 18:33:03 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-05-03 18:33:03 +0100
commit2b075561f9213530d1911bea875c5ed9ac42b1a6 (patch)
tree2d72260c7c5947dea390a97f4f444b191a6079c1 /lib/api/pipelines.rb
parenta5989900c9c001eaee971969b89a708f132c6d7c (diff)
parente14ca5394edf0497184415f12629dfdbe72a2727 (diff)
downloadgitlab-ce-31156-environments-vue-service.tar.gz
Merge branch 'master' into 31156-environments-vue-service31156-environments-vue-service
* master: (91 commits) Move api lint out of static analysis job Fix project tree saver and fork spec failures Fix lazy error handling of cron parser Use gitlab-workhorse 2.0.0 Revert to real click seeing as that was a bug with only the original branch Fixed issue_sidebar_spec.rb click as true click cannot hit the right element and removed sleep find and match first dropdown before clicking Elaborate on the usage of Spring Note Ghost user and refer to user deletion documentation Fix label creation from issuable for subgroup projects Detect already enabled DeployKeys in EnableDeployKeyService Extract common parts of snippet and blob pages into partial update article date link ldap-ee article from auth index add ldap article and changes from !10299 Fix misaligned buttons in wiki pages Improve pipelines_finder.rb Improve documentation Correct typo in pipelines_spec.rb Avoid using sample ...
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r--lib/api/pipelines.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 754c3d85a04..9117704aa46 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -14,13 +14,23 @@ module API
end
params do
use :pagination
- optional :scope, type: String, values: %w(running branches tags),
- desc: 'Either running, branches, or tags'
+ optional :scope, type: String, values: %w[running pending finished branches tags],
+ desc: 'The scope of pipelines'
+ optional :status, type: String, values: HasStatus::AVAILABLE_STATUSES,
+ desc: 'The status of pipelines'
+ optional :ref, type: String, desc: 'The ref of pipelines'
+ optional :yaml_errors, type: Boolean, desc: 'Returns pipelines with invalid configurations'
+ optional :name, type: String, desc: 'The name of the user who triggered pipelines'
+ optional :username, type: String, desc: 'The username of the user who triggered pipelines'
+ optional :order_by, type: String, values: PipelinesFinder::ALLOWED_INDEXED_COLUMNS, default: 'id',
+ desc: 'Order pipelines'
+ optional :sort, type: String, values: %w[asc desc], default: 'desc',
+ desc: 'Sort pipelines'
end
get ':id/pipelines' do
authorize! :read_pipeline, user_project
- pipelines = PipelinesFinder.new(user_project).execute(scope: params[:scope])
+ pipelines = PipelinesFinder.new(user_project, params).execute
present paginate(pipelines), with: Entities::PipelineBasic
end