Skip to content

Update MR widget Squash commits

Samantha Ming requested to merge 17613-fe-mr-widget-squash-options into master

Issue #17613 (closed)

MR Changes
Part 1 > !33099 (merged) BE implementation
Part 2 > !33827 (merged) FE implementation of squash option and MR form
👉 Part 3 > (current) FE implementation of squash option in MR widget
Part 4 > !35081 (merged) FE implementation of squash option tooltip
Part 5 > !35111 (merged) FE implementation of squash option message in MR form
Part 6 > !35392 (merged) Additional spec for testing edge case for part 2
Docs > !33930 (merged) Documentation

What does this MR do?

This update the MR widget squash commits to display the correct squash options selected in the Project and Merge request setting.

Testing Case

This is hidden behind a feature flag, docs

rails c

Feature.enable(:squash_options)
  1. Go to a Merge Request
  • The Squash commits will have the following behaviour:
Project Setting MR Setting MR widget Expectation
Do not allow hidden hidden
Do not allow hidden hidden
Require Checked Disabled, checked
Require Unchecked Disabled, checked
Allow Checked Enabled, Checked
Allow Unchecked Enabled, Unchecked
Encourage Checked Enabled, Checked
Encourage Unchecked Enabled, Unchecked

Setup

To set the project setting:

  • Go to the Settings > General page > expand Merge requests

To set the MR setting:

  • You can set the MR setting either in a New Merge Request OR you can Edit an existing Merge Request:

Note: if Do not allow is selected, the squash option will be hidden.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Closes #223032 (closed)

Edited by Samantha Ming

Merge request reports