From 24deb460c1e0b3ddcddd5f45308f0d02c744df15 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 9 Feb 2023 23:28:47 +0100 Subject: [PATCH] Add support for skipping `repository` audit. (#140767) --- cmd/lib/ci_matrix.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/lib/ci_matrix.rb b/cmd/lib/ci_matrix.rb index 46392eeb4d..8c2f174d8c 100644 --- a/cmd/lib/ci_matrix.rb +++ b/cmd/lib/ci_matrix.rb @@ -109,15 +109,20 @@ module CiMatrix modified_cask_files.flat_map do |path| cask_token = path.basename(".rb") - appcast_arg = if labels.include?("ci-skip-appcast") + audit_args = ["--online"] + audit_args << "--new-cask" if changed_files[:added_files].include?(path) + + audit_exceptions = [] + audit_exceptions << "repository" if labels.include?("ci-skip-repository") + + # TODO: Replace with `except`. + audit_args << if labels.include?("ci-skip-appcast") "--no-appcast" else "--appcast" end - audit_args = [appcast_arg, "--online"] - - audit_args << "--new-cask" if changed_files[:added_files].include?(path) + audit_args << "--except" << audit_exceptions.join(",") if audit_exceptions.any? runners(path).map do |runner| {