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:
authorAlexis Reigel <mail@koffeinfrei.org>2017-09-12 12:34:34 +0300
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2018-04-23 10:21:43 +0300
commitb55c3a7bc4c23618860916738702b5d62820c351 (patch)
tree6669d8a859abbffe49f750e5294d28dd85adc6f8 /lib/api/runner.rb
parent7fbdd17cbcd19086694f575884191a6d137838dc (diff)
support group runners in existing API endpoints
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r--lib/api/runner.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index 4d4fbe50f9f..49d9b0b1b4f 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -25,8 +25,11 @@ module API
# Create shared runner. Requires admin access
Ci::Runner.create(attributes.merge(is_shared: true))
elsif project = Project.find_by(runners_token: params[:token])
- # Create a specific runner for project.
+ # Create a specific runner for the project
project.runners.create(attributes)
+ elsif group = Group.find_by(runners_token: params[:token])
+ # Create a specific runner for the group
+ group.runners.create(attributes)
end
break forbidden! unless runner