summaryrefslogtreecommitdiff
path: root/lib/api/entities/ci/runner.rb
blob: a6944b8c92548c0cda4151f6388a4b86fdd64ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module API
  module Entities
    module Ci
      class Runner < Grape::Entity
        expose :id
        expose :description
        expose :ip_address
        expose :active # TODO Remove in %15.0 in favor of `paused` for REST calls, see https://gitlab.com/gitlab-org/gitlab/-/issues/351109
        expose :paused do |runner|
          !runner.active
        end
        expose :instance_type?, as: :is_shared
        expose :runner_type
        expose :name
        expose :online?, as: :online
        # DEPRECATED
        # TODO Remove in %15.0 in favor of `status` for REST calls, see https://gitlab.com/gitlab-org/gitlab/-/issues/344648
        expose :deprecated_rest_status, as: :status
      end
    end
  end
end