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)
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user