From 2cb6393595a68c0b3e3fd91b89339637d576baad Mon Sep 17 00:00:00 2001 From: Ash McKenzie Date: Tue, 27 Aug 2019 18:05:50 +1000 Subject: [PATCH] Allow Danger to detect if running local --- lib/gitlab/danger/helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/danger/helper.rb b/lib/gitlab/danger/helper.rb index 17ad07bfc0c..702c73e8e4d 100644 --- a/lib/gitlab/danger/helper.rb +++ b/lib/gitlab/danger/helper.rb @@ -38,8 +38,12 @@ module Gitlab ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md') end + def gitlab_helper + gitlab if respond_to?(:gitlab) + end + def release_automation? - gitlab.mr_author == RELEASE_TOOLS_BOT + gitlab_helper&.mr_author == RELEASE_TOOLS_BOT end def project_name