From bec7ff9807d73bf2ac641dfa3d46abeae0b9eccc Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 2 Jun 2013 12:48:57 +0100 Subject: [PATCH] Update pull request regex name to include commits. --- Library/Contributions/cmd/brew-pull.rb | 2 +- Library/Contributions/cmd/brew-test-bot.rb | 2 +- Library/Homebrew/global.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb index 6a055f77b3..521df766b6 100755 --- a/Library/Contributions/cmd/brew-pull.rb +++ b/Library/Contributions/cmd/brew-pull.rb @@ -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 diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index cbd05d185f..caee05395d 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -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? diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 72f4f757d0..46b48268a3 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -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']