Fix requesting pull request reviewers

The expected HTTP status code is 201

Fixes #1463
This commit is contained in:
Mislav Marohnić 2017-05-18 13:19:02 +02:00
Родитель 6a48391668
Коммит e3ad4ef7e5
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -745,6 +745,7 @@ BODY
post('/repos/mislav/coral/pulls/1234/requested_reviewers') {
halt 415 unless request.accept?('application/vnd.github.black-cat-preview+json')
assert :reviewers => ["mislav", "josh", "pcorpet"]
status 201
json :html_url => "the://url"
}
"""

Просмотреть файл

@ -141,7 +141,7 @@ func (client *Client) RequestReview(project *Project, prNumber int, params map[s
}
res, err := api.PostReview(fmt.Sprintf("repos/%s/%s/pulls/%d/requested_reviewers", project.Owner, project.Name, prNumber), params)
if err = checkStatus(200, "requesting reviewer", res, err); err != nil {
if err = checkStatus(201, "requesting reviewer", res, err); err != nil {
return
}