Use githubv4.MarkPullRequestReadyForReviewInput

This is available now that we've bumped githubv4
This commit is contained in:
Mislav Marohnić 2020-05-28 15:38:46 +02:00
parent 61ddd67f20
commit d026d6af2d

View file

@ -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 {