summaryrefslogtreecommitdiff
path: root/lib/api/runners.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-04 11:02:45 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-07-04 11:02:45 +0200
commitd3bcb06dc6365129b62dadf49efc58daecd39a83 (patch)
treef44332a1d3dccfabd84df94c44eacfb459f34385 /lib/api/runners.rb
parentca93faf15f822cbf3eda5e87d4aaaaa81d413a8b (diff)
downloadgitlab-ce-d3bcb06dc6365129b62dadf49efc58daecd39a83.tar.gz
Make deprecated scopes of Runner explicit
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r--lib/api/runners.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 6443e88e806..2071c5a62c1 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -170,6 +170,11 @@ module API
render_api_error!('Scope contains invalid value', 400)
end
+ # Support deprecated scopes
+ if runners.respond_to?("deprecated_#{scope}")
+ scope = "deprecated_#{scope}"
+ end
+
runners.public_send(scope) # rubocop:disable GitlabSecurity/PublicSend
end