(httpClient *http.Client, repo ghrepo.Interface, prID string)
| 740 | } |
| 741 | |
| 742 | func PullRequestClose(httpClient *http.Client, repo ghrepo.Interface, prID string) error { |
| 743 | var mutation struct { |
| 744 | ClosePullRequest struct { |
| 745 | PullRequest struct { |
| 746 | ID githubv4.ID |
| 747 | } |
| 748 | } `graphql:"closePullRequest(input: $input)"` |
| 749 | } |
| 750 | |
| 751 | variables := map[string]interface{}{ |
| 752 | "input": githubv4.ClosePullRequestInput{ |
| 753 | PullRequestID: prID, |
| 754 | }, |
| 755 | } |
| 756 | |
| 757 | client := NewClientFromHTTP(httpClient) |
| 758 | return client.Mutate(repo.RepoHost(), "PullRequestClose", &mutation, variables) |
| 759 | } |
| 760 | |
| 761 | func PullRequestReopen(httpClient *http.Client, repo ghrepo.Interface, prID string) error { |
| 762 | var mutation struct { |
no test coverage detected