Skip to content

Commit d026d6a

Browse files
committed
Use githubv4.MarkPullRequestReadyForReviewInput
This is available now that we've bumped githubv4
1 parent 61ddd67 commit d026d6a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

api/queries_pr.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -994,23 +994,17 @@ func PullRequestMerge(client *Client, repo ghrepo.Interface, pr *PullRequest, m
994994

995995
func PullRequestReady(client *Client, repo ghrepo.Interface, pr *PullRequest) error {
996996
var mutation struct {
997-
MarkPullRequestReadyForReviewInput struct {
997+
MarkPullRequestReadyForReview struct {
998998
PullRequest struct {
999999
ID githubv4.ID
10001000
}
10011001
} `graphql:"markPullRequestReadyForReview(input: $input)"`
10021002
}
10031003

1004-
type MarkPullRequestReadyForReviewInput struct {
1005-
PullRequestID githubv4.ID `json:"pullRequestId"`
1006-
}
1007-
1008-
input := MarkPullRequestReadyForReviewInput{PullRequestID: pr.ID}
1004+
input := githubv4.MarkPullRequestReadyForReviewInput{PullRequestID: pr.ID}
10091005

10101006
v4 := githubv4.NewClient(client.http)
1011-
err := v4.Mutate(context.Background(), &mutation, input, nil)
1012-
1013-
return err
1007+
return v4.Mutate(context.Background(), &mutation, input, nil)
10141008
}
10151009

10161010
func BranchDeleteRemote(client *Client, repo ghrepo.Interface, branch string) error {

0 commit comments

Comments
 (0)