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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 00:13:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 00:13:36 +0300
commite415571a6e766e961cd49a0ac92576c460a49e4d (patch)
treeac24a689ea599cb1ef4ff2dcea38984e8b5502c8 /tooling
parent68ce709bef9bc89bbb9869e24508777bbe0a1a1d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling')
-rwxr-xr-xtooling/lib/tooling/find_changes.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/tooling/lib/tooling/find_changes.rb b/tooling/lib/tooling/find_changes.rb
index c498c83d24b..f6fdf042c15 100755
--- a/tooling/lib/tooling/find_changes.rb
+++ b/tooling/lib/tooling/find_changes.rb
@@ -14,7 +14,8 @@ module Tooling
from:,
changed_files_pathname: nil,
predictive_tests_pathname: nil,
- frontend_fixtures_mapping_pathname: nil
+ frontend_fixtures_mapping_pathname: nil,
+ file_filter: ->(_) { true }
)
raise ArgumentError, ':from can only be :api or :changed_files' unless
@@ -28,6 +29,7 @@ module Tooling
@predictive_tests_pathname = predictive_tests_pathname
@frontend_fixtures_mapping_pathname = frontend_fixtures_mapping_pathname
@from = from
+ @file_filter = file_filter
end
def execute
@@ -50,7 +52,8 @@ module Tooling
private
attr_reader :gitlab_token, :gitlab_endpoint, :mr_project_path,
- :mr_iid, :changed_files_pathname, :predictive_tests_pathname, :frontend_fixtures_mapping_pathname
+ :mr_iid, :changed_files_pathname, :predictive_tests_pathname,
+ :frontend_fixtures_mapping_pathname, :file_filter
def gitlab
@gitlab ||= begin
@@ -82,7 +85,7 @@ module Tooling
@file_changes ||=
case @from
when :api
- mr_changes.changes.flat_map do |change|
+ mr_changes.changes.select(&file_filter).flat_map do |change|
change.to_h.values_at('old_path', 'new_path')
end.uniq
else