diff options
| author | Zhiming Wang | 2017-02-18 10:16:59 -0500 |
|---|---|---|
| committer | Zhiming Wang | 2017-02-20 10:36:24 -0500 |
| commit | 81a760921320b6508458d6cdbe4c73b3e01b14b3 (patch) | |
| tree | 966534078266fda6d57fe7763869fc5df4af002c /Library | |
| parent | 61a41d0da6862b2dc3493bd246b8e3c7a6cf5640 (diff) | |
| download | brew-81a760921320b6508458d6cdbe4c73b3e01b14b3.tar.bz2 | |
bump-formula-pr: improve duplicate detection
Reduce the chance of false flagging by making sure that the existing pr
surfaced by GitHub.issues_for_formula actually contains the exact formula name
in its title.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/bump-formula-pr.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index ea2daf1c4..bfe9c7776 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -80,7 +80,8 @@ module Homebrew def fetch_pull_requests(formula) GitHub.issues_for_formula(formula.name, tap: formula.tap).select do |pr| - pr["html_url"].include?("/pull/") + pr["html_url"].include?("/pull/") && + /(^|\s)#{Regexp.quote(formula.name)}(:|\s|$)/i =~ pr["title"] end rescue GitHub::RateLimitExceededError => e opoo e.message |
