Commit 587231d2 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '5960-consider-EE-ahead-of-CE' into 'master'

Update CE branch whenever EE is ahead of CE branch

Closes #5960

See merge request gitlab-org/gitlab-ee!5719
parents f8eba60d 6953fb79
......@@ -7,8 +7,8 @@ git_version
base = find_compare_base
current_numstat = updated_diff_numstat(base.ce_merge_base, base.ee_fetch_base)
updated_numstat = updated_diff_numstat(base.ce_updated_base, 'HEAD')
current_numstat = updated_diff_numstat(base.ce_base, base.ee_base)
updated_numstat = updated_diff_numstat(base.ce_head, base.ee_head)
offenses = updated_numstat.select do |file, updated_delta|
current_delta = current_numstat[file]
......@@ -16,11 +16,11 @@ offenses = updated_numstat.select do |file, updated_delta|
more_lines =
current_delta &&
updated_delta > current_delta &&
WHITELIST.all? { |pattern| !Dir.glob(pattern).include?(file) }
# Don't complain if we're just adding 1 or 2 more lines, which could be
# `prepend EE::Module` and a blank line that we want.
!(current_delta == 0 && updated_delta <= 2)
# Don't complain if we're just adding 1 or 2 more lines, which could be
# `prepend EE::Module` and a blank line that we want.
more_lines && !(current_delta == 0 && updated_delta <= 2)
more_lines && !WHITELIST.any? { |pattern| Dir.glob(pattern).include?(file) }
end
if offenses.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment