summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/api/jobs.rb21
-rw-r--r--lib/api/v3/deployments.rb8
2 files changed, 4 insertions, 25 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index b48574e173f..33c05e8aa63 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -40,27 +40,6 @@ module API
user_can_download_artifacts: can?(current_user, :read_build, user_project)
end
- desc 'Get jobs for a specific commit of a project' do
- success Entities::Job
- end
- params do
- requires :sha, type: String, desc: 'The SHA id of a commit'
- use :optional_scope
- use :pagination
- end
- get ':id/repository/commits/:sha/jobs' do
- authorize_read_builds!
-
- return not_found! unless user_project.commit(params[:sha])
-
- pipelines = user_project.pipelines.where(sha: params[:sha])
- builds = user_project.builds.where(pipeline: pipelines).order('id DESC')
- builds = filter_builds(builds, params[:scope])
-
- present paginate(builds), with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
- end
-
desc 'Get a specific job of a project' do
success Entities::Job
end
diff --git a/lib/api/v3/deployments.rb b/lib/api/v3/deployments.rb
index c5feb49b22f..545485fac0a 100644
--- a/lib/api/v3/deployments.rb
+++ b/lib/api/v3/deployments.rb
@@ -11,7 +11,7 @@ module API
resource :projects do
desc 'Get all deployments of the project' do
detail 'This feature was introduced in GitLab 8.11.'
- success Entities::Deployment
+ success ::API::V3::Deployments
end
params do
use :pagination
@@ -19,12 +19,12 @@ module API
get ':id/deployments' do
authorize! :read_deployment, user_project
- present paginate(user_project.deployments), with: Entities::Deployment
+ present paginate(user_project.deployments), with: ::API::V3::Deployments
end
desc 'Gets a specific deployment' do
detail 'This feature was introduced in GitLab 8.11.'
- success Entities::Deployment
+ success ::API::V3::Deployments
end
params do
requires :deployment_id, type: Integer, desc: 'The deployment ID'
@@ -34,7 +34,7 @@ module API
deployment = user_project.deployments.find(params[:deployment_id])
- present deployment, with: Entities::Deployment
+ present deployment, with: ::API::V3::Deployments
end
end
end