Move the ee? helper method into the helper
This commit is contained in:
parent
f034a35250
commit
235fe67bdb
|
@ -16,16 +16,12 @@ consider adding any of the %<labels>s labels.
|
||||||
#{SEE_DOC}
|
#{SEE_DOC}
|
||||||
MSG
|
MSG
|
||||||
|
|
||||||
def ee?
|
|
||||||
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
|
|
||||||
end
|
|
||||||
|
|
||||||
def ee_changelog?(changelog_path)
|
def ee_changelog?(changelog_path)
|
||||||
changelog_path =~ /unreleased-ee/
|
changelog_path =~ /unreleased-ee/
|
||||||
end
|
end
|
||||||
|
|
||||||
def ce_port_changelog?(changelog_path)
|
def ce_port_changelog?(changelog_path)
|
||||||
ee? && !ee_changelog?(changelog_path)
|
helper.ee? && !ee_changelog?(changelog_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_changelog(path)
|
def check_changelog(path)
|
||||||
|
|
|
@ -31,6 +31,11 @@ module Danger
|
||||||
.sort
|
.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [Boolean]
|
||||||
|
def ee?
|
||||||
|
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
|
||||||
|
end
|
||||||
|
|
||||||
# @return [Hash<String,Array<String>>]
|
# @return [Hash<String,Array<String>>]
|
||||||
def changes_by_category
|
def changes_by_category
|
||||||
all_changed_files.inject(Hash.new { |h, k| h[k] = [] }) do |hsh, file|
|
all_changed_files.inject(Hash.new { |h, k| h[k] = [] }) do |hsh, file|
|
||||||
|
|
Loading…
Reference in New Issue