diff options
Diffstat (limited to 'app/models/project_setting.rb')
-rw-r--r-- | app/models/project_setting.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/project_setting.rb b/app/models/project_setting.rb index 6d40544fad4..7116ccd9824 100644 --- a/app/models/project_setting.rb +++ b/app/models/project_setting.rb @@ -2,6 +2,7 @@ class ProjectSetting < ApplicationRecord include ::Gitlab::Utils::StrongMemoize + include EachBatch ALLOWED_TARGET_PLATFORMS = %w(ios osx tvos watchos android).freeze @@ -20,12 +21,13 @@ class ProjectSetting < ApplicationRecord validates :merge_commit_template, length: { maximum: Project::MAX_COMMIT_TEMPLATE_LENGTH } validates :squash_commit_template, length: { maximum: Project::MAX_COMMIT_TEMPLATE_LENGTH } + validates :issue_branch_template, length: { maximum: Issue::MAX_BRANCH_TEMPLATE } validates :target_platforms, inclusion: { in: ALLOWED_TARGET_PLATFORMS } validates :suggested_reviewers_enabled, inclusion: { in: [true, false] } validate :validates_mr_default_target_self - default_value_for(:legacy_open_source_license_available) do + attribute :legacy_open_source_license_available, default: -> do Feature.enabled?(:legacy_open_source_license_available, type: :ops) end @@ -57,7 +59,7 @@ class ProjectSetting < ApplicationRecord !!super end end - strong_memoize_attr :show_diff_preview_in_email + strong_memoize_attr :show_diff_preview_in_email?, :show_diff_preview_in_email private |