summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 15:07:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 15:07:34 +0000
commit8b61452138ecc511b52cd49be4ee6b8a80390c50 (patch)
tree122b817432c2a0f0e23767bd95791a89b20540c0 /danger
parentf864f8a7aafa45b0e4c04e4312f89da4b1227c0f (diff)
downloadgitlab-ce-8b61452138ecc511b52cd49be4ee6b8a80390c50.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/commit_messages/Dangerfile14
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