(httpClient *http.Client, repo ghrepo.Interface, issue *api.Issue)
| 116 | } |
| 117 | |
| 118 | func apiReopen(httpClient *http.Client, repo ghrepo.Interface, issue *api.Issue) error { |
| 119 | if issue.IsPullRequest() { |
| 120 | return api.PullRequestReopen(httpClient, repo, issue.ID) |
| 121 | } |
| 122 | |
| 123 | var mutation struct { |
| 124 | ReopenIssue struct { |
| 125 | Issue struct { |
| 126 | ID githubv4.ID |
| 127 | } |
| 128 | } `graphql:"reopenIssue(input: $input)"` |
| 129 | } |
| 130 | |
| 131 | variables := map[string]interface{}{ |
| 132 | "input": githubv4.ReopenIssueInput{ |
| 133 | IssueID: issue.ID, |
| 134 | }, |
| 135 | } |
| 136 | |
| 137 | gql := api.NewClientFromHTTP(httpClient) |
| 138 | return gql.Mutate(repo.RepoHost(), "IssueReopen", &mutation, variables) |
| 139 | } |
no test coverage detected