From 9f80a7bce20a88dbb279727bb248f62fc25b39cb Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 8 Mar 2020 20:13:36 +0000 Subject: [PATCH] rubocops/patches: Make more GitHub patch locations enforce revisions - We recently deleted a load of old Homebrew/formula-patches patches for non-existent core formulae (https://github.com/Homebrew/formula-patches/pull/283). This is a good action to take. Users should always be able to retrieve the patch once it's been deleted from the repo, if the formula they continue to use specifies a git revision to pull from, not just `master`. - The code to detect `master` formulae was already here, so this adds another GitHub host to the detection: `raw.githubusercontent.com` as that's what the current patches that use `master` (https://github.com/Homebrew/homebrew-core/pull/51329) link to. - Fixes https://github.com/Homebrew/homebrew-core/issues/51313. --- Library/Homebrew/rubocops/patches.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/rubocops/patches.rb b/Library/Homebrew/rubocops/patches.rb index f9c8f5c65f..9095bf38c1 100644 --- a/Library/Homebrew/rubocops/patches.rb +++ b/Library/Homebrew/rubocops/patches.rb @@ -39,6 +39,7 @@ module RuboCop end gh_patch_patterns = Regexp.union([%r{/raw\.github\.com/}, + %r{/raw\.githubusercontent\.com/}, %r{gist\.github\.com/raw}, %r{gist\.github\.com/.+/raw}, %r{gist\.githubusercontent\.com/.+/raw}])