From 5b00ab493bbe734eb646276174f85d770470449c Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 31 Aug 2011 15:39:16 +0100 Subject: [PATCH] Don't point user at issues that are probably unrelated --- Library/Homebrew/utils.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 81f7d6192b..08e6c52648 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -371,8 +371,12 @@ module GitHub extend self issues = [] open "http://github.com/api/v2/yaml/issues/search/mxcl/homebrew/open/#{name}" do |f| - YAML::load(f.read)['issues'].each do |issue| - issues << 'https://github.com/mxcl/homebrew/issues/#issue/%s' % issue['number'] + yaml = YAML::load(f.read); + yaml['issues'].each do |issue| + # don't include issues that just refer to the tool in their body + if issue['title'].include? name + issues << 'https://github.com/mxcl/homebrew/issues/#issue/%s' % issue['number'] + end end end