From c3b47da587f798fd7453bc0512d0c4770c5bfb90 Mon Sep 17 00:00:00 2001 From: commitay Date: Sun, 17 Jun 2018 22:11:47 +1000 Subject: [PATCH] cask_pr_manual_check: official homebrew-cask taps only (#48565) --- developer/bin/cask_pr_manual_check | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer/bin/cask_pr_manual_check b/developer/bin/cask_pr_manual_check index 66cd2b0d5d..ffb3d7ec8c 100755 --- a/developer/bin/cask_pr_manual_check +++ b/developer/bin/cask_pr_manual_check @@ -6,8 +6,8 @@ require 'tmpdir' pr_url = ARGV[0] -abort 'You need to give the script exactly one argument, the URL to a pull request on the Caskroom organisation' if ARGV[0].empty? -abort 'URL is not from the Homebrew organization' if pr_url !~ %r{^https://github.com/Homebrew/} +abort 'You need to give the script exactly one argument, the URL to a pull request from an official Homebrew-Cask tap' if ARGV[0].empty? +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)