From 59e7d04bc78a69137b649dc8ac470a6c3eedbd3c Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Mon, 30 Jan 2017 12:11:58 +0100 Subject: Expose pipelines as PipelineBasic `projects/:id/pipelines` The `projects/:id/pipelines` exposed a lot of extra details that are superfluous and it was taking extra resources to fetch them. To get more details about a pipeline, use `projects/:id/pipelines/:pipeline_id`. --- lib/api/api.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/api/api.rb') diff --git a/lib/api/api.rb b/lib/api/api.rb index 3e53ab693ab..89449ce8813 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -20,6 +20,7 @@ module API mount ::API::V3::MergeRequestDiffs mount ::API::V3::MergeRequests mount ::API::V3::Notes + mount ::API::V3::Pipelines mount ::API::V3::ProjectHooks mount ::API::V3::Milestones mount ::API::V3::Projects -- cgit v1.2.1 From 111748ea89752825d6baba783b3b687c48e9e830 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 22 Feb 2017 11:13:59 +0100 Subject: Rename Builds to Jobs in the API Fixes gitlab-org/gitlab-ce#28515 [ci skip] --- lib/api/api.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/api/api.rb') diff --git a/lib/api/api.rb b/lib/api/api.rb index 89449ce8813..91ca8c66344 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -9,6 +9,7 @@ module API mount ::API::V3::Boards mount ::API::V3::Branches mount ::API::V3::BroadcastMessages + mount ::API::V3::Builds mount ::API::V3::Commits mount ::API::V3::DeployKeys mount ::API::V3::Environments @@ -77,7 +78,6 @@ module API mount ::API::Boards mount ::API::Branches mount ::API::BroadcastMessages - mount ::API::Builds mount ::API::Commits mount ::API::CommitStatuses mount ::API::DeployKeys @@ -87,6 +87,7 @@ module API mount ::API::Groups mount ::API::Internal mount ::API::Issues + mount ::API::Jobs mount ::API::Keys mount ::API::Labels mount ::API::Lint -- cgit v1.2.1 From 8993801f0cefdc64b46b8fe30622cc78eaa03173 Mon Sep 17 00:00:00 2001 From: Pawel Chojnacki Date: Fri, 17 Feb 2017 12:52:27 +0100 Subject: Test various login scenarios if the limit gets enforced --- lib/api/api.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/api/api.rb') diff --git a/lib/api/api.rb b/lib/api/api.rb index 89449ce8813..6f37fa9d8e9 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -60,6 +60,10 @@ module API error! e.message, e.status, e.headers end + rescue_from Gitlab::Auth::TooManyIps do |e| + rack_response({'message'=>'403 Forbidden'}.to_json, 403) + end + rescue_from :all do |exception| handle_api_exception(exception) end -- cgit v1.2.1 From 9cc0ff8f468c54e23172492d97f6d9b428d3ad2e Mon Sep 17 00:00:00 2001 From: Pawel Chojnacki Date: Fri, 17 Feb 2017 14:44:57 +0100 Subject: Cleanup common code in Unique Ips tests --- lib/api/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/api.rb') diff --git a/lib/api/api.rb b/lib/api/api.rb index 6f37fa9d8e9..efbb56ecd2c 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -61,7 +61,7 @@ module API end rescue_from Gitlab::Auth::TooManyIps do |e| - rack_response({'message'=>'403 Forbidden'}.to_json, 403) + rack_response({ 'message' => '403 Forbidden' }.to_json, 403) end rescue_from :all do |exception| -- cgit v1.2.1