提交 d2d203bc 编写于 作者: M Mislav Marohnić

[pull-request] Fix non-draft pull requests

This works around a GitHub API issue where it blocks PRs based on their
draft status even if they were `draft: false`.

Fixes #2099
上级 e8ab68d8
...@@ -318,9 +318,12 @@ of text is the title and the rest is the description.`, fullBase, fullHead)) ...@@ -318,9 +318,12 @@ of text is the title and the rest is the description.`, fullBase, fullHead))
pullRequestURL = "PULL_REQUEST_URL" pullRequestURL = "PULL_REQUEST_URL"
} else { } else {
params := map[string]interface{}{ params := map[string]interface{}{
"base": base, "base": base,
"head": fullHead, "head": fullHead,
"draft": args.Flag.Bool("--draft"), }
if args.Flag.Bool("--draft") {
params["draft"] = true
} }
if title != "" { if title != "" {
......
...@@ -14,7 +14,7 @@ Feature: hub pull-request ...@@ -14,7 +14,7 @@ Feature: hub pull-request
:body => nil, :body => nil,
:base => 'master', :base => 'master',
:head => 'mislav:master', :head => 'mislav:master',
:draft => false, :draft => nil,
:issue => nil :issue => nil
status 201 status 201
json :html_url => "the://url" json :html_url => "the://url"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册