Merge pull request #912 from cli/pr-create-codeowners-fix

Preserve CODEOWNERS reviewers in `pr create`
This commit is contained in:
Nate Smith 2020-05-13 10:05:10 -05:00 committed by GitHub
commit 3552bca596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -667,6 +667,7 @@ func CreatePullRequest(client *Client, repo *Repository, params map[string]inter
requestReviews(input: $input) { clientMutationId }
}`
reviewParams["pullRequestId"] = pr.ID
reviewParams["union"] = true
variables := map[string]interface{}{
"input": reviewParams,
}

View file

@ -184,6 +184,7 @@ func TestPRCreate_metadata(t *testing.T) {
eq(t, inputs["pullRequestId"], "NEWPULLID")
eq(t, inputs["userIds"], []interface{}{"HUBOTID"})
eq(t, inputs["teamIds"], []interface{}{"COREID"})
eq(t, inputs["union"], true)
}))
cs, cmdTeardown := test.InitCmdStubber()