aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2016-04-04 02:00:21 +0800
committerXu Cheng2016-04-04 02:00:21 +0800
commitbc19a47eb9378e449a922fc2f2ec1788c46bc92e (patch)
treef003777c4dae07ba8ea90e9f978a61b55dad0cc2 /Library/Homebrew
parentd0b713c3963c3d94545e8be077da9d4ba71e435a (diff)
downloadbrew-bc19a47eb9378e449a922fc2f2ec1788c46bc92e.tar.bz2
GitHub: fix issues/pr searching
Closes #6.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/exceptions.rb2
-rw-r--r--Library/Homebrew/utils.rb7
2 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index d2af84fcc..79cfac012 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -219,7 +219,7 @@ class BuildError < RuntimeError
end
def fetch_issues
- GitHub.issues_for_formula(formula.name)
+ GitHub.issues_for_formula(formula.name, :tap => formula.tap)
rescue GitHub::RateLimitExceededError => e
opoo e.message
[]
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 0675cce5d..509a5ff20 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -663,7 +663,7 @@ module GitHub
def build_search_qualifier_string(qualifiers)
{
- :repo => "Homebrew/homebrew",
+ :repo => "Homebrew/homebrew-core",
:in => "title"
}.update(qualifiers).map do |qualifier, value|
"#{qualifier}:#{value}"
@@ -679,8 +679,9 @@ module GitHub
end
end
- def issues_for_formula(name)
- issues_matching(name, :state => "open")
+ def issues_for_formula(name, options = {})
+ tap = options[:tap] || CoreTap.instance
+ issues_matching(name, :state => "open", :repo => "#{tap.user}/homebrew-#{tap.repo}")
end
def print_pull_requests_matching(query)