pr-pull: fix PRs conflicting with themselves

https://github.com/Homebrew/homebrew-core/pull/106755#issuecomment-1206460655
This commit is contained in:
Carlo Cabrera 2022-08-05 21:41:28 +08:00
parent 1807ac77d5
commit 61544369e4
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -373,6 +373,8 @@ module Homebrew
"org:#{user}", repo: repo, state: "open", label: "\"no long build conflict\"" "org:#{user}", repo: repo, state: "open", label: "\"no long build conflict\""
).each_with_object({}) do |long_build_pr, hash| ).each_with_object({}) do |long_build_pr, hash|
number = long_build_pr["number"] number = long_build_pr["number"]
next if number == pr
GitHub.get_pull_request_changed_files("#{user}/#{repo}", number).each do |file| GitHub.get_pull_request_changed_files("#{user}/#{repo}", number).each do |file|
key = file["filename"] key = file["filename"]
hash[key] ||= [] hash[key] ||= []