Add project level config for merge pipelines

Add schema

Add CE counter part

Add default value for

Add changelog

Fix schema

Add test

Fix schema

Fix schema version

Remove default value for
This commit is contained in:
Shinya Maeda 2019-02-19 17:49:12 +09:00
parent 716412d962
commit 6bbc380127
4 changed files with 18 additions and 0 deletions

View file

@ -9,6 +9,7 @@
%span.descr
Pipelines need to be configured to enable this feature.
= link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank'
= render_if_exists 'projects/merge_pipelines_settings', form: form
.form-check
= form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input'
= form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do

View file

@ -0,0 +1,5 @@
---
title: Add project level config for merge pipelines
merge_request: 25385
author:
type: added

View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
class AddMergePipelinesEnabledToCiCdSettings < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
add_column :project_ci_cd_settings, :merge_pipelines_enabled, :boolean
end
end

View file

@ -1575,6 +1575,7 @@ ActiveRecord::Schema.define(version: 20190220150130) do
create_table "project_ci_cd_settings", force: :cascade do |t|
t.integer "project_id", null: false
t.boolean "group_runners_enabled", default: true, null: false
t.boolean "merge_pipelines_enabled"
t.index ["project_id"], name: "index_project_ci_cd_settings_on_project_id", unique: true, using: :btree
end