Merge pull request #10028 from bayandin/do-not-automerge-draft-prs

dev-cmd/pr-automerge: exclude draft PRs
This commit is contained in:
Alexander Bayandin 2020-12-15 16:01:56 +00:00 committed by GitHub
commit 3e53d5ba70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ module Homebrew
without_labels = args.without_labels || ["do not merge", "new formula", "automerge-skip", "linux-only"] without_labels = args.without_labels || ["do not merge", "new formula", "automerge-skip", "linux-only"]
tap = Tap.fetch(args.tap || CoreTap.instance.name) tap = Tap.fetch(args.tap || CoreTap.instance.name)
query = "is:pr is:open repo:#{tap.full_name}" query = "is:pr is:open repo:#{tap.full_name} draft:false"
query += args.ignore_failures? ? " -status:pending" : " status:success" query += args.ignore_failures? ? " -status:pending" : " status:success"
query += " review:approved" unless args.without_approval? query += " review:approved" unless args.without_approval?
query += " label:\"#{args.with_label}\"" if args.with_label query += " label:\"#{args.with_label}\"" if args.with_label