diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-09 12:10:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-09 12:10:57 +0300 |
commit | caf519f7459d953af10a741c808d641015bc4d32 (patch) | |
tree | 33214ff0ef71065df802e9558eb2614f7672b69c | |
parent | f9e1ee549e79c7c9ac119d125732d1d3a35fa060 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/validators/json_schemas/scan_result_policy_project_approval_settings.json | 22 | ||||
-rw-r--r-- | db/migrate/20230831111051_add_approval_settings_to_scan_result_policies.rb | 10 | ||||
-rw-r--r-- | db/schema_migrations/20230831111051 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 | ||||
-rw-r--r-- | qa/Gemfile | 2 | ||||
-rw-r--r-- | qa/Gemfile.lock | 4 |
6 files changed, 38 insertions, 3 deletions
diff --git a/app/validators/json_schemas/scan_result_policy_project_approval_settings.json b/app/validators/json_schemas/scan_result_policy_project_approval_settings.json new file mode 100644 index 00000000000..5a81c61ede4 --- /dev/null +++ b/app/validators/json_schemas/scan_result_policy_project_approval_settings.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Scan result policy project_approval_settings", + "type": "object", + "properties": { + "prevent_approval_by_author": { + "type": "boolean" + }, + "prevent_approval_by_commit_author": { + "type": "boolean" + }, + "remove_approvals_with_new_commit": { + "type": "boolean" + }, + "require_password_to_approve": { + "type": "boolean" + }, + "block_unprotecting_branches": { + "type": "boolean" + } + } +} diff --git a/db/migrate/20230831111051_add_approval_settings_to_scan_result_policies.rb b/db/migrate/20230831111051_add_approval_settings_to_scan_result_policies.rb new file mode 100644 index 00000000000..3bd3f58c2dd --- /dev/null +++ b/db/migrate/20230831111051_add_approval_settings_to_scan_result_policies.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddApprovalSettingsToScanResultPolicies < Gitlab::Database::Migration[2.1] + enable_lock_retries! + + def change + add_column :scan_result_policies, :project_approval_settings, :jsonb, default: {}, null: false + add_column :scan_result_policies, :commits, :smallint + end +end diff --git a/db/schema_migrations/20230831111051 b/db/schema_migrations/20230831111051 new file mode 100644 index 00000000000..36217b23759 --- /dev/null +++ b/db/schema_migrations/20230831111051 @@ -0,0 +1 @@ +2058852d302266208a39c718d91a1d537c84330a7cee369d75d1a4e6420300b5
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index b04e4548746..09b4ba9f825 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -22777,6 +22777,8 @@ CREATE TABLE scan_result_policies ( vulnerability_attributes jsonb DEFAULT '{}'::jsonb, project_id bigint, rule_idx smallint, + project_approval_settings jsonb DEFAULT '{}'::jsonb NOT NULL, + commits smallint, CONSTRAINT age_value_null_or_positive CHECK (((age_value IS NULL) OR (age_value >= 0))), CONSTRAINT check_scan_result_policies_rule_idx_positive CHECK (((rule_idx IS NULL) OR (rule_idx >= 0))) ); diff --git a/qa/Gemfile b/qa/Gemfile index 2ab4a293ffb..f1103f472c8 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -gem 'gitlab-qa', '~> 12', '>= 12.4.0', require: 'gitlab/qa' +gem 'gitlab-qa', '~> 12', '>= 12.4.1', require: 'gitlab/qa' gem 'gitlab_quality-test_tooling', '~> 0.9.3', require: false gem 'gitlab-utils', path: '../gems/gitlab-utils' gem 'activesupport', '~> 7.0.5.1' # This should stay in sync with the root's Gemfile diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 22078d82161..8994e6df233 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -121,7 +121,7 @@ GEM gitlab (4.19.0) httparty (~> 0.20) terminal-table (>= 1.5.1) - gitlab-qa (12.4.0) + gitlab-qa (12.4.1) activesupport (>= 6.1, < 7.1) gitlab (~> 4.19) http (~> 5.0) @@ -351,7 +351,7 @@ DEPENDENCIES faraday-retry (~> 2.2) fog-core (= 2.1.0) fog-google (~> 1.19) - gitlab-qa (~> 12, >= 12.4.0) + gitlab-qa (~> 12, >= 12.4.1) gitlab-utils! gitlab_quality-test_tooling (~> 0.9.3) influxdb-client (~> 2.9) |