Skip to content

WIP: Squash options

enzu.ru requested to merge enzuru/gitlab:ak-squash-options into master

What does this MR do?

This merge request adds configuring defaults for squashing on a project-level: #17613 (closed)

There are four aspects to this:

  • Change the Project model to have squash options "always", "never", "enabled", or "disabled"
  • Allow the Project model squash options to be set in the repository's settings
  • The above squash options should effect creating a new merge request
  • The above squash options should effect currently existing merge requests by failing them if they submit with an invalid option

Screenshots

Settings -> General -> Merge requests

Screenshot_from_2020-03-23_12-41-49

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

The primary thing to test would be how do pre-existing PRs function after this option is changed on the project-level? Tests need to ensure those edge cases are fine. This means the squash options needs to be enforced on a model-level.

Edited by enzu.ru

Merge request reports