(httpClient *http.Client, repo ghrepo.Interface, prID string)
| 765 | } |
| 766 | |
| 767 | func PullRequestClose(httpClient *http.Client, repo ghrepo.Interface, prID string) error { |
| 768 | var mutation struct { |
| 769 | ClosePullRequest struct { |
| 770 | PullRequest struct { |
| 771 | ID githubv4.ID |
| 772 | } |
| 773 | } `graphql:"closePullRequest(input: $input)"` |
| 774 | } |
| 775 | |
| 776 | variables := map[string]any{ |
| 777 | "input": githubv4.ClosePullRequestInput{ |
| 778 | PullRequestID: prID, |
| 779 | }, |
| 780 | } |
| 781 | |
| 782 | client := NewClientFromHTTP(httpClient) |
| 783 | return client.Mutate(repo.RepoHost(), "PullRequestClose", &mutation, variables) |
| 784 | } |
| 785 | |
| 786 | func PullRequestReopen(httpClient *http.Client, repo ghrepo.Interface, prID string) error { |
| 787 | var mutation struct { |
no test coverage detected