(client *Client, repoHost string, params CommentUpdateInput)
| 80 | } |
| 81 | |
| 82 | func CommentUpdate(client *Client, repoHost string, params CommentUpdateInput) (string, error) { |
| 83 | var mutation struct { |
| 84 | UpdateIssueComment struct { |
| 85 | IssueComment struct { |
| 86 | URL string |
| 87 | } |
| 88 | } `graphql:"updateIssueComment(input: $input)"` |
| 89 | } |
| 90 | |
| 91 | variables := map[string]interface{}{ |
| 92 | "input": githubv4.UpdateIssueCommentInput{ |
| 93 | Body: githubv4.String(params.Body), |
| 94 | ID: githubv4.ID(params.CommentId), |
| 95 | }, |
| 96 | } |
| 97 | |
| 98 | err := client.Mutate(repoHost, "CommentUpdate", &mutation, variables) |
| 99 | if err != nil { |
| 100 | return "", err |
| 101 | } |
| 102 | |
| 103 | return mutation.UpdateIssueComment.IssueComment.URL, nil |
| 104 | } |
| 105 | |
| 106 | func CommentDelete(client *Client, repoHost string, params CommentDeleteInput) error { |
| 107 | var mutation struct { |
no test coverage detected