dev-cmd/pr-automerge: deprecate --autosquash

This commit is contained in:
Carlo Cabrera 2021-07-18 15:36:19 +08:00
parent 080bd8bd4a
commit 3325b79726
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -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