diff --git a/Library/Homebrew/dev-cmd/pr-automerge.rb b/Library/Homebrew/dev-cmd/pr-automerge.rb index 5f58d20d02..2b32850333 100644 --- a/Library/Homebrew/dev-cmd/pr-automerge.rb +++ b/Library/Homebrew/dev-cmd/pr-automerge.rb @@ -30,6 +30,9 @@ module Homebrew switch "--autosquash", description: "Instruct `brew pr-publish` to automatically reformat and reword commits "\ "in the pull request to our preferred format." + switch "--no_autosquash", + description: "Instruct `brew pr-publish` to skip automatically reformattin and rewording commits "\ + "in the pull request to the preferred format." switch "--ignore-failures", description: "Include pull requests that have failing status checks." @@ -40,6 +43,8 @@ module Homebrew def pr_automerge args = pr_automerge_args.parse + odeprecated "`brew pr-publish --autosquash`" if args.autosquash? + without_labels = args.without_labels || [ "do not merge", "new formula", @@ -71,7 +76,7 @@ module Homebrew publish_args = ["pr-publish"] publish_args << "--tap=#{tap}" if tap - publish_args << "--autosquash" if args.autosquash? + publish_args << "--autosquash" unless args.no_autosquash? if args.publish? safe_system HOMEBREW_BREW_FILE, *publish_args, *pr_urls else