Add support for skipping `repository` audit. (#140767)

This commit is contained in:
Markus Reiter 2023-02-09 23:28:47 +01:00 committed by GitHub
parent 5ac1aad16c
commit 24deb460c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -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|
{