Update pull request regex name to include commits.

This commit is contained in:
Mike McQuaid 2013-06-02 12:48:57 +01:00
parent a886a1b3e3
commit bec7ff9807
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ ARGV.named.each do|arg|
if arg.to_i > 0
url = 'https://github.com/mxcl/homebrew/pull/' + arg
else
url_match = arg.match HOMEBREW_PULL_URL_REGEX
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
unless url_match
ohai 'Ignoring URL:', "Not a GitHub pull request or commit: #{arg}"
next

View File

@ -106,7 +106,7 @@ class Test
@url = nil
@formulae = []
url_match = argument.match HOMEBREW_PULL_URL_REGEX
url_match = argument.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
formula = Formula.factory argument rescue FormulaUnavailableError
git "rev-parse --verify #{argument} &>/dev/null"
if $?.success?

View File

@ -92,7 +92,7 @@ end
require 'metafiles'
FORMULA_META_FILES = Metafiles.new
ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting"
HOMEBREW_PULL_URL_REGEX = 'https:\/\/github.com\/(\w+)\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})'
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = 'https:\/\/github.com\/(\w+)\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})'
require 'compat' unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']