Skip to content
Snippets Groups Projects
Commit 345457b3 authored by Jack Nagel's avatar Jack Nagel
Browse files

Pass the string instead of reconstructing it from a regexp

parent 0a379477
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ module Homebrew extend self
if count == 0 and not blacklisted? query
puts "No formula found for #{query.inspect}."
begin
GitHub.find_pull_requests(rx) { |pull| puts pull }
GitHub.find_pull_requests(query) { |pull| puts pull }
rescue GitHub::Error => e
opoo e.message
end
......
......@@ -308,12 +308,10 @@ module GitHub extend self
issues_matching(name).select { |issue| issue["state"] == "open" }
end
def find_pull_requests rx
def find_pull_requests query
return if ENV['HOMEBREW_NO_GITHUB_API']
puts "Searching pull requests..."
query = rx.source.delete('.*').gsub('\\', '')
open_or_closed_prs = issues_matching(query).select do |issue|
issue["pull_request"]["html_url"]
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment