diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:14:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 14:14:39 +0000 |
commit | 1eb82b65c554f21d83447f895a6208905fabe112 (patch) | |
tree | ab12f01b3dc46f11c02afea1e470a78f06ca70c2 /danger/commit_messages/Dangerfile | |
parent | 4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff) | |
download | gitlab-ce-stable-branch-foss-test.tar.gz |
Add latest changes from gitlab-org/gitlab@12-3-auto-deploy-20190916stable-branch-foss-test
Diffstat (limited to 'danger/commit_messages/Dangerfile')
-rw-r--r-- | danger/commit_messages/Dangerfile | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/danger/commit_messages/Dangerfile b/danger/commit_messages/Dangerfile index 064b8c94805..d371ade4887 100644 --- a/danger/commit_messages/Dangerfile +++ b/danger/commit_messages/Dangerfile @@ -37,10 +37,6 @@ class EmojiChecker end end -def gitlab_danger - @gitlab_danger ||= GitlabDanger.new(helper.gitlab_helper) -end - def fail_commit(commit, message) fail("#{commit.sha}: #{message}") end @@ -60,8 +56,6 @@ def subject_starts_with_capital?(subject) end def ce_upstream? - return unless gitlab_danger.ci? - gitlab.mr_labels.any? { |label| label == 'CE upstream' } end @@ -94,8 +88,8 @@ def lint_commit(commit) # rubocop:disable Metrics/AbcSize # We ignore revert commits as they are well structured by Git already return false if commit.message.start_with?('Revert "') - is_squash = gitlab_danger.ci? ? gitlab.mr_json['squash'] : false - is_wip = gitlab_danger.ci? ? gitlab.mr_json['work_in_progress'] : false + is_squash = gitlab.mr_json['squash'] + is_wip = gitlab.mr_json['work_in_progress'] is_fixup = commit.message.start_with?('fixup!', 'squash!') if is_fixup |