From 4ea6a8ccbbd17492869e0b5e5af33cd6b13fa73b Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 29 Feb 2024 20:41:09 -0800 Subject: [PATCH] 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. --- Library/Homebrew/utils/github.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index b774209507..307aed6852 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -570,7 +570,6 @@ module GitHub end return if pull_requests.blank? - force = ENV.fetch("HOMEBREW_TEST_BOT_AUTOBUMP", nil).present? duplicates_message = <<~EOS These #{state} pull requests may be duplicates: #{pull_requests.map { |pr| "#{pr["title"]} #{pr["html_url"]}" }.join("\n")} @@ -579,11 +578,10 @@ module GitHub Duplicate PRs should not be opened. Manually open these PRs if you are sure that they are not duplicates. EOS - if force && !quiet - opoo duplicates_message - elsif !force && quiet + + if quiet odie error_message - elsif !force + else odie <<~EOS #{duplicates_message.chomp} #{error_message}