debian-mirror-gitlab/app/models/concerns/ci/has_deployment_name.rb
2022-07-16 19:58:13 +02:00

15 lines
283 B
Ruby

# frozen_string_literal: true
module Ci
module HasDeploymentName
extend ActiveSupport::Concern
def count_user_deployment?
deployment_name?
end
def deployment_name?
self.class::DEPLOYMENT_NAMES.any? { |n| name.downcase.include?(n) }
end
end
end