mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
cask-pr-manual-check: use uri.read in json.parse
This commit is contained in:
@@ -10,7 +10,7 @@ abort 'You need to give the script exactly one argument, the URL to a pull reque
|
||||
abort 'URL is not from an official Homebrew Cask tap' if pr_url !~ %r{^https://github.com/Homebrew/homebrew-cask.*}
|
||||
|
||||
pr_api = pr_url.sub(%r{^https://github.com/([^/]+)/([^/]+)/pull/([^/]+).*}, 'https://api.github.com/repos/\1/\2/pulls/\3/files')
|
||||
pr_json = JSON.parse(open(pr_api).read)
|
||||
pr_json = JSON.parse(URI(pr_api).read)
|
||||
|
||||
abort 'PR needs to have a single file' if pr_json.count != 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user