Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tooling/bin/find_changes')
-rwxr-xr-xtooling/bin/find_changes10
1 files changed, 7 insertions, 3 deletions
diff --git a/tooling/bin/find_changes b/tooling/bin/find_changes
index 8ad5011459b..38e1f363dd9 100755
--- a/tooling/bin/find_changes
+++ b/tooling/bin/find_changes
@@ -46,12 +46,16 @@ class FindChanges # rubocop:disable Gitlab/NamespacedClass
config.private_token = gitlab_token
end
- mr_changes = Gitlab.merge_request_changes(mr_project_path, mr_iid)
-
- mr_changes.changes.map { |change| change['new_path'] unless change['deleted_file'] }.compact
+ mr_changes.changes.flat_map do |change|
+ change.to_h.values_at('old_path', 'new_path')
+ end.uniq
end
end
+ def mr_changes
+ @mr_changes ||= Gitlab.merge_request_changes(mr_project_path, mr_iid)
+ end
+
def test_files
return [] if !matched_tests_file || !File.exist?(matched_tests_file)