aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorJack Nagel2014-02-13 17:39:53 -0500
committerJack Nagel2014-02-13 17:39:53 -0500
commitf7ef4964a72d3dfb8c631cafe83ba1e2a8a5dacc (patch)
treea7e341ae6820bb00547f290817938cf6bd534c5e /Library/Homebrew/utils.rb
parentf5ceae9f94b8c3b0bdfca8fa8dc5715e1f79b7e0 (diff)
downloadbrew-f7ef4964a72d3dfb8c631cafe83ba1e2a8a5dacc.tar.bz2
Offload more filtering to the search API
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 23778605e..e460af5b5 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -320,16 +320,14 @@ module GitHub extend self
def issues_for_formula name
# don't include issues that just refer to the tool in their body
- issues_matching(name).select { |issue| issue["state"] == "open" }
+ issues_matching(name, :state => "open")
end
def find_pull_requests query
return if ENV['HOMEBREW_NO_GITHUB_API']
puts "Searching pull requests..."
- open_or_closed_prs = issues_matching(query).select do |issue|
- issue["pull_request"]["html_url"]
- end
+ open_or_closed_prs = issues_matching(query, :type => "pr")
open_prs = open_or_closed_prs.select {|i| i["state"] == "open" }
if open_prs.any?