diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /tooling/bin/find_changes | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'tooling/bin/find_changes')
-rwxr-xr-x | tooling/bin/find_changes | 10 |
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) |