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.
This commit is contained in:
parent
61a41d0da6
commit
81a7609213
@ -80,7 +80,8 @@ module Homebrew
|
|||||||
|
|
||||||
def fetch_pull_requests(formula)
|
def fetch_pull_requests(formula)
|
||||||
GitHub.issues_for_formula(formula.name, tap: formula.tap).select do |pr|
|
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
|
end
|
||||||
rescue GitHub::RateLimitExceededError => e
|
rescue GitHub::RateLimitExceededError => e
|
||||||
opoo e.message
|
opoo e.message
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user