Move the ee? helper method into the helper

This commit is contained in:
Nick Thomas 2019-02-07 14:38:32 +00:00
parent f034a35250
commit 235fe67bdb
No known key found for this signature in database
GPG key ID: 2A313A47AFADACE9
2 changed files with 6 additions and 5 deletions

View file

@ -16,16 +16,12 @@ consider adding any of the %<labels>s labels.
#{SEE_DOC}
MSG
def ee?
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
end
def ee_changelog?(changelog_path)
changelog_path =~ /unreleased-ee/
end
def ce_port_changelog?(changelog_path)
ee? && !ee_changelog?(changelog_path)
helper.ee? && !ee_changelog?(changelog_path)
end
def check_changelog(path)

View file

@ -31,6 +31,11 @@ module Danger
.sort
end
# @return [Boolean]
def ee?
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
end
# @return [Hash<String,Array<String>>]
def changes_by_category
all_changed_files.inject(Hash.new { |h, k| h[k] = [] }) do |hsh, file|