diff options
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r-- | app/models/project_ci_cd_setting.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb index c0c2ea42d46..28a493cae33 100644 --- a/app/models/project_ci_cd_setting.rb +++ b/app/models/project_ci_cd_setting.rb @@ -1,9 +1,11 @@ # frozen_string_literal: true class ProjectCiCdSetting < ApplicationRecord + include ChronicDurationAttribute + belongs_to :project, inverse_of: :ci_cd_settings - DEFAULT_GIT_DEPTH = 50 + DEFAULT_GIT_DEPTH = 20 before_create :set_default_git_depth @@ -17,6 +19,8 @@ class ProjectCiCdSetting < ApplicationRecord default_value_for :forward_deployment_enabled, true + chronic_duration_attr :runner_token_expiration_interval_human_readable, :runner_token_expiration_interval + def forward_deployment_enabled? super && ::Feature.enabled?(:forward_deployment_enabled, project, default_enabled: true) end |