Skip to content

When using suggestions, squash must be enabled

Achilleas Pipinellis requested to merge danger-comply-with-suggestions into master

What does this MR do?

TL;DR Make it compulsory to have squashed enabled if suggestions are applied.

We have the great feature on suggesting changes in a merge request, but our current workflow essentially conflicts with that feature.

We have a hard rule of the commit message being at most 72 characters long, so danger fails each time "Apply suggestion" is used, since it uses the file path in the commit message and that can be really long. For example:

Apply suggestion to doc/user/application_security/license_management/index.md

With this change, we make the linter pass if there's a suggestion applied and squash enabled in the merge request.

Related issues

There's a general issue about danger being very strict, but there's a comment about applying suggestions specifically https://gitlab.com/gitlab-org/gitlab-ce/issues/62099#note_181456097.

Edited by Achilleas Pipinellis

Merge request reports