Skip to content
Snippets Groups Projects
Unverified Commit 9f80a7bc authored by Issy Long's avatar Issy Long
Browse files

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.
parent 19050bd7
No related branches found
No related tags found
No related merge requests found
......@@ -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}])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment