Commit 8660f732 authored by Robert Speicher's avatar Robert Speicher

Merge branch '5063-fix-ee-files-location-check-ee' into 'master'

Resolve "ee-files-location-check bug for non-'gitlab-org' repo-based MRs"

Closes #5063

See merge request gitlab-org/gitlab-ee!4746
parents 4617a251 7f3c97f8
......@@ -18,14 +18,11 @@ WHITELIST = [
new_files_in_this_branch_not_at_the_ee_top_level =
`git diff canonical-ee/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
ce_repo_url = ENV['CI_REPOSITORY_URL'].sub('gitlab-ee', 'gitlab-ce')
current_branch = ENV.fetch('CI_COMMIT_REF_NAME', `git rev-parse --abbrev-ref HEAD`).strip
ce_branch_name = current_branch.sub(/(\Aee\-|\-ee\z)/, '')
`git fetch canonical-ce #{ce_branch_name} --quiet`
unless $?.success?
`git fetch canonical-ce 'master' --quiet`
end
`git fetch #{ce_repo_url} #{ce_branch_name} --quiet` || `git fetch canonical-ce 'master' --quiet`
ee_specific_files_in_ce_master_not_at_the_ee_top_level =
`git diff FETCH_HEAD..HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
......
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