diff options
Diffstat (limited to 'danger')
-rw-r--r-- | danger/commit_messages/Dangerfile | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/danger/commit_messages/Dangerfile b/danger/commit_messages/Dangerfile index 60bc90139ab..a7466aa6ffb 100644 --- a/danger/commit_messages/Dangerfile +++ b/danger/commit_messages/Dangerfile @@ -59,12 +59,6 @@ def subject_starts_with_capital?(subject) first_char.upcase == first_char end -def ce_upstream? - return unless gitlab_danger.ci? - - gitlab.mr_labels.any? { |label| label == 'CE upstream' } -end - def too_many_changed_lines?(commit) commit.diff_parent.stats[:total][:files] > 3 && lines_changed_in_commit(commit) >= 30 @@ -291,11 +285,11 @@ def lint_commits(commits) end end -if count_filtered_commits(git.commits) > 10 && !ce_upstream? - warn( +lint_commits(git.commits) + +if count_filtered_commits(git.commits) > 10 + fail( 'This merge request includes more than 10 commits. ' \ 'Please rebase these commits into a smaller number of commits.' ) -else - lint_commits(git.commits) end |