Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-09-06 14:21:53 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-09-06 14:21:53 +0300
commit9fc9ab2ba2b0db05f6365054aa3bddcda3c7333d (patch)
treed59a451e3300c4598f2aa66d4b6e82b0b3fa56ef /lib/gitlab
parent3441092b3840cecb913068542ee9242ea19a2017 (diff)
Add new GitlabDanger class
This class encapsulates our use of the Danger gem.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/danger/helper.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/danger/helper.rb b/lib/gitlab/danger/helper.rb
index 17ad07bfc0c..e2911b4e6c8 100644
--- a/lib/gitlab/danger/helper.rb
+++ b/lib/gitlab/danger/helper.rb
@@ -38,8 +38,17 @@ module Gitlab
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
end
+ def gitlab_helper
+ # Unfortunately the following does not work:
+ # - respond_to?(:gitlab)
+ # - respond_to?(:gitlab, true)
+ gitlab
+ rescue NoMethodError
+ nil
+ end
+
def release_automation?
- gitlab.mr_author == RELEASE_TOOLS_BOT
+ gitlab_helper&.mr_author == RELEASE_TOOLS_BOT
end
def project_name