Make the regex for URL checking more git friendly
* Urls for Git Commits need to be between 4-40 not 40. For example: https://github.com/mxcl/homebrew/commit/805a https://github.com/mxcl/homebrew/commit/805 Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
5733fce6fc
commit
d5c58f889a
@ -16,7 +16,7 @@ end
|
||||
HOMEBREW_REPOSITORY.cd do
|
||||
ARGV.each do|arg|
|
||||
# This regex should work, if it's too precise, feel free to fix it.
|
||||
if !arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/\d+|commit\/\w{40})'
|
||||
if !arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/\d+|commit\/\w{4,40})'
|
||||
ohai 'Ignoring URL:', "Not a GitHub pull request or commit: #{arg}"
|
||||
next
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user