gitlab-org--gitlab-foss/app/models/ci/runner_project.rb

18 lines
449 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2015-08-26 01:42:46 +00:00
module Ci
class RunnerProject < ApplicationRecord
extend Gitlab::Ci::Model
include Limitable
self.limit_name = 'ci_registered_project_runners'
self.limit_scope = :project
self.limit_feature_flag = :ci_runner_limits
2017-03-17 23:06:11 +00:00
2018-05-28 11:07:28 +00:00
belongs_to :runner, inverse_of: :runner_projects
belongs_to :project, inverse_of: :runner_projects
2015-08-26 01:42:46 +00:00
2017-03-17 23:06:11 +00:00
validates :runner_id, uniqueness: { scope: :project_id }
2015-08-26 01:42:46 +00:00
end
end