From b26d92ca9adb5b181fdfa15aeb1e01aabeab3f80 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 28 Mar 2023 23:07:03 +0800 Subject: [PATCH] :bug: fixes --- Library/Homebrew/dev-cmd/pr-automerge.rb | 3 +-- Library/Homebrew/dev-cmd/pr-publish.rb | 9 +++++---- Library/Homebrew/dev-cmd/pr-pull.rb | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/dev-cmd/pr-automerge.rb b/Library/Homebrew/dev-cmd/pr-automerge.rb index 41fae16eb6..04c92ec374 100644 --- a/Library/Homebrew/dev-cmd/pr-automerge.rb +++ b/Library/Homebrew/dev-cmd/pr-automerge.rb @@ -33,8 +33,7 @@ module Homebrew "in the pull request to the preferred format." switch "--no-autosquash", description: "Instruct `brew pr-publish` to skip automatically reformatting and rewording commits " \ - "in the pull request to the preferred format.", - replacement: "`--autosquash` to opt in" + "in the pull request to the preferred format." switch "--ignore-failures", description: "Include pull requests that have failing status checks." diff --git a/Library/Homebrew/dev-cmd/pr-publish.rb b/Library/Homebrew/dev-cmd/pr-publish.rb index 699c83cdee..9dfa9c8e7c 100644 --- a/Library/Homebrew/dev-cmd/pr-publish.rb +++ b/Library/Homebrew/dev-cmd/pr-publish.rb @@ -23,8 +23,7 @@ module Homebrew "to our preferred format." switch "--no-autosquash", description: "Skip automatically reformatting and rewording commits in the pull request " \ - "to the preferred format, even if supported on the target tap.", - replacement: "`--autosquash` to opt in" + "to the preferred format, even if supported on the target tap." switch "--large-runner", description: "Run the upload job on a large runner." flag "--branch=", @@ -68,8 +67,10 @@ module Homebrew inputs[:pull_request] = issue pr_labels = GitHub.pull_request_labels(user, repo, issue) - oh1 "Found `autosquash` label on ##{issue}. Requesting autosquash." - inputs[:autosquash] = true if pr_labels.include?("autosquash") + if pr_labels.include?("autosquash") + oh1 "Found `autosquash` label on ##{issue}. Requesting autosquash." + inputs[:autosquash] = true + end if args.tap.present? && !T.must("#{user}/#{repo}".casecmp(tap.full_name)).zero? odie "Pull request URL is for #{user}/#{repo} but `--tap=#{tap.full_name}` was specified!" diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index aa91edf6d0..bc71c91125 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -36,8 +36,7 @@ module Homebrew "preferred format." switch "--no-autosquash", description: "Skip automatically reformatting and rewording commits in the pull request to our " \ - "preferred format.", - replacement: "`--autosquash` to opt in" + "preferred format." switch "--branch-okay", description: "Do not warn if pulling to a branch besides the repository default (useful for testing)." switch "--resolve",