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.
This commit is contained in:
Issy Long 2020-03-08 20:13:36 +00:00
parent 19050bd738
commit 9f80a7bce2
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -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}])