Use githubv4.MarkPullRequestReadyForReviewInput
This is available now that we've bumped githubv4
This commit is contained in:
parent
61ddd67f20
commit
d026d6af2d
1 changed files with 3 additions and 9 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue