summaryrefslogtreecommitdiff
path: root/lib/api/runner.rb
diff options
context:
space:
mode:
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