diff options
Diffstat (limited to 'app/models/ci/runner_namespace.rb')
-rw-r--r-- | app/models/ci/runner_namespace.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/runner_namespace.rb b/app/models/ci/runner_namespace.rb index 82390ccc538..502ceae3675 100644 --- a/app/models/ci/runner_namespace.rb +++ b/app/models/ci/runner_namespace.rb @@ -15,6 +15,8 @@ module Ci validates :runner_id, uniqueness: { scope: :namespace_id } validate :group_runner_type + scope :for_runner, ->(runner_id) { where(runner_id: runner_id) } + def recent_runners ::Ci::Runner.belonging_to_group(namespace_id).recent end |