Allow Danger to detect if running local

This commit is contained in:
Ash McKenzie 2019-08-27 18:05:50 +10:00
parent 86fa2fe1fd
commit 2cb6393595
No known key found for this signature in database
GPG key ID: A1253B4953E8D3E6

View file

@ -38,8 +38,12 @@ module Gitlab
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md') ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
end end
def gitlab_helper
gitlab if respond_to?(:gitlab)
end
def release_automation? def release_automation?
gitlab.mr_author == RELEASE_TOOLS_BOT gitlab_helper&.mr_author == RELEASE_TOOLS_BOT
end end
def project_name def project_name