Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2017-03-13 18:35:10 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-03-16 12:16:39 +0300
commit5c91f9221d33d4ab6b221230f77ac089f2adc027 (patch)
tree4a7f6ed59f9d4c7a8d648ad1bc711f77b966f0d9 /lib
parent0390734b71f0cc381d3cc6d5ec88cfcfa54d3b3e (diff)
Fix regression in runners registration v1 api
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/api/runners.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ci/api/runners.rb b/lib/ci/api/runners.rb
index c1fd959ef14..45aa2adccf5 100644
--- a/lib/ci/api/runners.rb
+++ b/lib/ci/api/runners.rb
@@ -24,13 +24,13 @@ module Ci
optional :locked, type: Boolean, desc: 'Lock this runner for this specific project'
end
post "register" do
- runner_params = declared(params, include_missing: false)
+ runner_params = declared(params, include_missing: false).except(:token)
runner =
if runner_registration_token_valid?
# Create shared runner. Requires admin access
Ci::Runner.create(runner_params.merge(is_shared: true))
- elsif project = Project.find_by(runners_token: runner_params[:token])
+ elsif project = Project.find_by(runners_token: params[:token])
# Create a specific runner for project.
project.runners.create(runner_params)
end