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
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-14 11:36:54 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-06-14 11:36:54 +0300
commit5f887344c033d9a5e07a784b56d048a1f33045ab (patch)
treedd9eb880082cc33eb48d130e8c05ff376f103a19 /lib/api/runners.rb
parent121c6322809951105d43a90e573378785b9e33a8 (diff)
Prefer Runner#assign_to instead of creating directly
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r--lib/api/runners.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 4faba9dc87b..be92355d9a6 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -96,7 +96,7 @@ module API
runner = get_runner(params[:runner_id])
authenticate_enable_runner!(runner)
- Ci::RunnerProject.create(runner: runner, project: user_project)
+ runner.assign_to(user_project)
present runner, with: Entities::Runner
end