Remove ability to skip the duplicate PR check in autobump

This simply removes the environment variable check. The code was disabled in core around two weeks ago in https://github.com/Homebrew/homebrew-core/pull/163023. We need this PR to land first as explained in https://github.com/Homebrew/actions/pull/506#issuecomment-1972489707 to unblock other PRs.
This commit is contained in:
Kevin 2024-02-29 20:41:09 -08:00 committed by apainintheneck
parent 977ac20b2b
commit 4ea6a8ccbb

View File

@ -570,7 +570,6 @@ module GitHub
end end
return if pull_requests.blank? return if pull_requests.blank?
force = ENV.fetch("HOMEBREW_TEST_BOT_AUTOBUMP", nil).present?
duplicates_message = <<~EOS duplicates_message = <<~EOS
These #{state} pull requests may be duplicates: These #{state} pull requests may be duplicates:
#{pull_requests.map { |pr| "#{pr["title"]} #{pr["html_url"]}" }.join("\n")} #{pull_requests.map { |pr| "#{pr["title"]} #{pr["html_url"]}" }.join("\n")}
@ -579,11 +578,10 @@ module GitHub
Duplicate PRs should not be opened. Duplicate PRs should not be opened.
Manually open these PRs if you are sure that they are not duplicates. Manually open these PRs if you are sure that they are not duplicates.
EOS EOS
if force && !quiet
opoo duplicates_message if quiet
elsif !force && quiet
odie error_message odie error_message
elsif !force else
odie <<~EOS odie <<~EOS
#{duplicates_message.chomp} #{duplicates_message.chomp}
#{error_message} #{error_message}