summaryrefslogtreecommitdiff
path: root/tooling/lib/tooling/find_changes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tooling/lib/tooling/find_changes.rb')
-rwxr-xr-xtooling/lib/tooling/find_changes.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/tooling/lib/tooling/find_changes.rb b/tooling/lib/tooling/find_changes.rb
index 25381e1a894..c498c83d24b 100755
--- a/tooling/lib/tooling/find_changes.rb
+++ b/tooling/lib/tooling/find_changes.rb
@@ -8,6 +8,8 @@ module Tooling
class FindChanges
include Helpers::PredictiveTestsHelper
+ ALLOWED_FILE_TYPES = ['.js', '.vue', '.md', '.scss'].freeze
+
def initialize(
from:,
changed_files_pathname: nil,
@@ -41,8 +43,8 @@ module Tooling
end
end
- def only_js_files_changed
- file_changes.any? && file_changes.all? { |file| file.end_with?('.js') }
+ def only_allowed_files_changed
+ file_changes.any? && file_changes.all? { |file| ALLOWED_FILE_TYPES.include?(File.extname(file)) }
end
private