diff options
Diffstat (limited to 'lib/ci/api/helpers.rb')
-rw-r--r-- | lib/ci/api/helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb index bcabf7a21b2..ba80c89df78 100644 --- a/lib/ci/api/helpers.rb +++ b/lib/ci/api/helpers.rb @@ -32,6 +32,14 @@ module Ci end end + def build_not_found! + if headers['User-Agent'].match(/gitlab-ci-multi-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /) + no_content! + else + not_found! + end + end + def current_runner @runner ||= Runner.find_by_token(params[:token].to_s) end |