Draft: Project setting to allow or disallow merge before pipeline succeeds [ RUN AS-IF-FOSS ][ RUN ALL RSPEC ]
requested to merge 320981-project-setting-to-disable-merge-immediately-when-merge-trains-is-enabled into master
What does this MR do?
Issue #320981 (closed)
TODO:
-
Move to EE and restrict to premium. -
Add a feature flag
Graphql Queries
Get
query {
project(fullPath: "root/1") {
id,
ciCdSettings {
allowMergeBeforePipelineCompletes
}
}
}
Update
mutation {
ciCdSettingsUpdate(
input: {
fullPath: "root/1",
allowMergeBeforePipelineCompletes: true}
) {
errors
}
}
Database
Migrations
up:
== 20210216153814 AddMergeBeforePipelineSucceedsToCiCdSettings: migrating =====
-- add_column(:project_ci_cd_settings, :allow_merge_before_pipeline_completes, :boolean, {:default=>true, :null=>false})
-> 0.0033s
== 20210216153814 AddMergeBeforePipelineSucceedsToCiCdSettings: migrated (0.0114s)
down:
== 20210216153814 AddMergeBeforePipelineSucceedsToCiCdSettings: reverting =====
-- remove_column(:project_ci_cd_settings, :allow_merge_before_pipeline_succeeds)
-> 0.0015s
== 20210216153814 AddMergeBeforePipelineSucceedsToCiCdSettings: reverted (0.0086s)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Allison Browne