Commit 34654cc8 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-danger-multi-line-commit-selection-when-squashing' into 'master'

Exclude merge commit from multi-line commit selection in Danger

See merge request gitlab-org/gitlab!24776
parents a76d136e 1edea66d
......@@ -89,9 +89,9 @@ def lint_commits(commits)
end
if squash_mr?
multi_line_commit_linter = commit_linters.detect { |commit_linter| commit_linter.multi_line? }
multi_line_commit_linter = commit_linters.detect { |commit_linter| !commit_linter.merge? && commit_linter.multi_line? }
if multi_line_commit_linter && multi_line_commit_linter.lint.failed?
if multi_line_commit_linter && multi_line_commit_linter.failed?
warn_or_fail_commits(multi_line_commit_linter)
fail_message('The commit message that will be used in the squash commit does not meet our Git commit message standards.')
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment