diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/models/project_setting.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) | |
download | gitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
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 |