diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-09 15:08:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-09 15:08:19 +0300 |
commit | 5b98c2c50664b78cbf50094de6b40abcff818831 (patch) | |
tree | 2220bb9d74b3b6133d03932945ae4109db954cf3 /app/models/project.rb | |
parent | 5fe2d74e00bacd9a78d43801a9ed19325597f7ae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index b250fe87fdb..65785e81f1b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -89,23 +89,21 @@ class Project < ApplicationRecord cache_markdown_field :description, pipeline: :description - default_value_for :packages_enabled, true - default_value_for :archived, false - default_value_for :resolve_outdated_diff_discussions, false - default_value_for(:repository_storage) do - Repository.pick_storage_shard - end + attribute :packages_enabled, default: true + attribute :archived, default: false + attribute :resolve_outdated_diff_discussions, default: false + attribute :repository_storage, default: -> { Repository.pick_storage_shard } + attribute :shared_runners_enabled, default: -> { Gitlab::CurrentSettings.shared_runners_enabled } + attribute :only_allow_merge_if_all_discussions_are_resolved, default: false + attribute :remove_source_branch_after_merge, default: true + attribute :autoclose_referenced_issues, default: true + attribute :ci_config_path, default: -> { Gitlab::CurrentSettings.default_ci_config_path } - default_value_for(:shared_runners_enabled) { Gitlab::CurrentSettings.shared_runners_enabled } default_value_for :issues_enabled, gitlab_config_features.issues default_value_for :merge_requests_enabled, gitlab_config_features.merge_requests default_value_for :builds_enabled, gitlab_config_features.builds default_value_for :wiki_enabled, gitlab_config_features.wiki default_value_for :snippets_enabled, gitlab_config_features.snippets - default_value_for :only_allow_merge_if_all_discussions_are_resolved, false - default_value_for :remove_source_branch_after_merge, true - default_value_for :autoclose_referenced_issues, true - default_value_for(:ci_config_path) { Gitlab::CurrentSettings.default_ci_config_path } add_authentication_token_field :runners_token, encrypted: -> { Feature.enabled?(:projects_tokens_optional_encryption) ? :optional : :required }, |