From 4f6d64e5bde7e55b2b8f8a6afbdcd911486883b1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 15 Feb 2022 03:13:45 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- ...Pipeline Authoring Issue Implementation.md | 38 +++++++++++++++++++ app/models/project_setting.rb | 4 ++ .../legacy_open_source_license_available.yml | 8 ++++ ...e_license_available_to_project_settings.rb | 9 +++++ db/schema_migrations/20220203133652 | 1 + db/structure.sql | 1 + spec/requests/api/project_attributes.yml | 2 +- spec/requests/api/projects_spec.rb | 1 + tooling/danger/project_helper.rb | 2 + 9 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .gitlab/issue_templates/Pipeline Authoring Issue Implementation.md create mode 100644 config/feature_flags/ops/legacy_open_source_license_available.yml create mode 100644 db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb create mode 100644 db/schema_migrations/20220203133652 diff --git a/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md new file mode 100644 index 00000000000..4544e675256 --- /dev/null +++ b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md @@ -0,0 +1,38 @@ + + +## Summary + +## Proposal + +## Implementation Table + + + + +| Group | Issue Link | +| ------ | ------ | +| ~backend | :point_left: You are here | +| ~frontend | [#123123](url) | + + + +## Links/References + + + + +/label ~"group::pipeline authoring" ~"Category:Pipeline Authoring" ~"section::ops" ~"devops::verify" ~"workflow::planning breakdown" diff --git a/app/models/project_setting.rb b/app/models/project_setting.rb index c17dff553a0..ae3d7038a88 100644 --- a/app/models/project_setting.rb +++ b/app/models/project_setting.rb @@ -19,6 +19,10 @@ 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 } + default_value_for(:legacy_open_source_license_available) do + Feature.enabled?(:legacy_open_source_license_available, default_enabled: :yaml, type: :ops) + end + def squash_enabled_by_default? %w[always default_on].include?(squash_option) end diff --git a/config/feature_flags/ops/legacy_open_source_license_available.yml b/config/feature_flags/ops/legacy_open_source_license_available.yml new file mode 100644 index 00000000000..2408e31633a --- /dev/null +++ b/config/feature_flags/ops/legacy_open_source_license_available.yml @@ -0,0 +1,8 @@ +--- +name: legacy_open_source_license_available +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/79855 +rollout_issue_url: +milestone: '14.8' +type: ops +group: 'group::authentication and authorization' +default_enabled: true diff --git a/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb b/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb new file mode 100644 index 00000000000..47f92fae496 --- /dev/null +++ b/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddLegacyOpenSourceLicenseAvailableToProjectSettings < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + add_column :project_settings, :legacy_open_source_license_available, :boolean, default: true, null: false + end +end diff --git a/db/schema_migrations/20220203133652 b/db/schema_migrations/20220203133652 new file mode 100644 index 00000000000..7deda2292b4 --- /dev/null +++ b/db/schema_migrations/20220203133652 @@ -0,0 +1 @@ +5642cf604a1aaf8bef6098a9918b582e0e336d79ca3b2a005cf90bb8eab0ca13 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 47697c716da..5a909d655fa 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -18724,6 +18724,7 @@ CREATE TABLE project_settings ( has_shimo boolean DEFAULT false NOT NULL, squash_commit_template text, show_diff_preview_in_email boolean DEFAULT true NOT NULL, + legacy_open_source_license_available boolean DEFAULT true NOT NULL, CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)), CONSTRAINT check_b09644994b CHECK ((char_length(squash_commit_template) <= 500)), CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)), diff --git a/spec/requests/api/project_attributes.yml b/spec/requests/api/project_attributes.yml index 01d2fb18f00..8a6e87944ec 100644 --- a/spec/requests/api/project_attributes.yml +++ b/spec/requests/api/project_attributes.yml @@ -121,7 +121,6 @@ project_feature: - created_at - metrics_dashboard_access_level - project_id - - requirements_access_level - security_and_compliance_access_level - updated_at computed_attributes: @@ -139,6 +138,7 @@ project_setting: - has_confluence - has_shimo - has_vulnerabilities + - legacy_open_source_license_available - prevent_merge_without_jira_issue - warn_about_potentially_unwanted_characters - previous_default_branch diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 73c78b85b3b..02df82d14a8 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -2166,6 +2166,7 @@ RSpec.describe API::Projects do approvals_before_merge compliance_frameworks mirror + requirements_access_level requirements_enabled security_and_compliance_enabled issues_template diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb index cc80411e750..eaf33608b83 100644 --- a/tooling/danger/project_helper.rb +++ b/tooling/danger/project_helper.rb @@ -45,6 +45,8 @@ module Tooling %r{\Adoc/.*(\.(md|png|gif|jpg|yml))\z} => :docs, %r{\A(CONTRIBUTING|LICENSE|MAINTENANCE|PHILOSOPHY|PROCESS|README)(\.md)?\z} => :docs, %r{\Adata/whats_new/} => :docs, + %r{\Adata/deprecations/} => :none, + %r{\Adata/removals/} => :none, %r{\A((ee|jh)/)?app/finders/(.+/)?integrations/} => [:integrations_be, :database, :backend], [%r{\A((ee|jh)/)?db/(geo/)?(migrate|post_migrate)/}, %r{(:integrations|:\w+_tracker_data)\b}] => [:integrations_be, :database, :migration],