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

Fix assigning user to pull request without labels

Fixes #1057
上级 21ab7c78
......@@ -223,10 +223,17 @@ func pullRequest(cmd *Command, args *Args) {
if flagPullRequestAssignee != "" || flagPullRequestMilestone > 0 ||
flagPullRequestLabels != "" {
labels := []string{}
for _, label := range strings.Split(flagPullRequestLabels, ",") {
if label != "" {
labels = append(labels, label)
}
}
params := octokit.IssueParams{
Assignee: flagPullRequestAssignee,
Milestone: flagPullRequestMilestone,
Labels: strings.Split(flagPullRequestLabels, ","),
Labels: labels,
}
err = client.UpdateIssue(baseProject, pr.Number, params)
......
......@@ -605,7 +605,7 @@ Feature: hub pull-request
json :html_url => "the://url", :number => 1234
}
patch('/repos/mislav/coral/issues/1234') {
assert :assignee => "mislav"
assert :assignee => "mislav", :labels => nil
json :html_url => "the://url"
}
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册