Merge pull request #11044 from Bo98/pr-pull-no-commit

dev-cmd/pr-pull: don't cherry-pick on --no-commit
This commit is contained in:
Mike McQuaid 2021-04-06 13:53:14 +01:00 committed by GitHub
commit 35daa145ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -391,7 +391,9 @@ module Homebrew
ohai "Fetching #{tap} pull request ##{pr}"
Dir.mktmpdir pr do |dir|
cd dir do
original_commit = tap.path.git_head
original_commit = ENV["GITHUB_SHA"].presence || tap.path.git_head
unless args.no_commit?
cherry_pick_pr!(user, repo, pr, path: tap.path, args: args)
if args.autosquash? && !args.dry_run?
autosquash!(original_commit, path: tap.path,
@ -404,6 +406,7 @@ module Homebrew
org: bintray_org, repo: mirror_repo, publish: !args.no_publish?,
args: args)
end
end
unless formulae_need_bottles?(tap, original_commit, user, repo, pr, args: args)
ohai "Skipping artifacts for ##{pr} as the formulae don't need bottles"