MCPcopy Index your code
hub / github.com/cli/cli / CommentUpdate

Function CommentUpdate

api/queries_comments.go:82–104  ·  view source on GitHub ↗
(client *Client, repoHost string, params CommentUpdateInput)

Source from the content-addressed store, hash-verified

80}
81
82func 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
106func CommentDelete(client *Client, repoHost string, params CommentDeleteInput) error {
107 var mutation struct {

Callers 1

updateCommentFunction · 0.92

Calls 3

IDMethod · 0.65
MutateMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected