From d026d6af2dca339b2e2700620e07d41002a7038c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 28 May 2020 15:38:46 +0200 Subject: [PATCH] Use githubv4.MarkPullRequestReadyForReviewInput This is available now that we've bumped githubv4 --- api/queries_pr.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/api/queries_pr.go b/api/queries_pr.go index b2e6b5650..cca77be99 100644 --- a/api/queries_pr.go +++ b/api/queries_pr.go @@ -994,23 +994,17 @@ func PullRequestMerge(client *Client, repo ghrepo.Interface, pr *PullRequest, m func PullRequestReady(client *Client, repo ghrepo.Interface, pr *PullRequest) error { var mutation struct { - MarkPullRequestReadyForReviewInput struct { + MarkPullRequestReadyForReview struct { PullRequest struct { ID githubv4.ID } } `graphql:"markPullRequestReadyForReview(input: $input)"` } - type MarkPullRequestReadyForReviewInput struct { - PullRequestID githubv4.ID `json:"pullRequestId"` - } - - input := MarkPullRequestReadyForReviewInput{PullRequestID: pr.ID} + input := githubv4.MarkPullRequestReadyForReviewInput{PullRequestID: pr.ID} v4 := githubv4.NewClient(client.http) - err := v4.Mutate(context.Background(), &mutation, input, nil) - - return err + return v4.Mutate(context.Background(), &mutation, input, nil) } func BranchDeleteRemote(client *Client, repo ghrepo.Interface, branch string) error {