From b954e20d1257b94c7bbf99018a1460377fe005bd Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sun, 22 Oct 2023 18:09:03 -0400 Subject: [PATCH] audit(github): also need to consider commit artifact Signed-off-by: Rui Chen --- Library/Homebrew/rubocops/urls.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/rubocops/urls.rb b/Library/Homebrew/rubocops/urls.rb index abd4fda102..d8acf8c728 100644 --- a/Library/Homebrew/rubocops/urls.rb +++ b/Library/Homebrew/rubocops/urls.rb @@ -217,7 +217,7 @@ module RuboCop problem "Use /archive/ URLs for GitHub tarballs (url is #{url})." end - archive_ref_tags_gh_pattern = %r{https://.*github.*/archive(?!/refs/tags)/.*\.tar\.gz$} + archive_ref_tags_gh_pattern = %r{https://.*github.*/archive/(?![a-fA-F0-9]{40})(?!refs/tags/).*\.tar\.gz$} audit_urls(urls, archive_ref_tags_gh_pattern) do |_, url| next if url.end_with?(".git")