MCPcopy
hub / github.com/cli/cli / apiDelete

Function apiDelete

pkg/cmd/issue/delete/delete.go:119–136  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, issueID string)

Source from the content-addressed store, hash-verified

117}
118
119func apiDelete(httpClient *http.Client, repo ghrepo.Interface, issueID string) error {
120 var mutation struct {
121 DeleteIssue struct {
122 Repository struct {
123 ID githubv4.ID
124 }
125 } `graphql:"deleteIssue(input: $input)"`
126 }
127
128 variables := map[string]interface{}{
129 "input": githubv4.DeleteIssueInput{
130 IssueID: issueID,
131 },
132 }
133
134 gql := api.NewClientFromHTTP(httpClient)
135 return gql.Mutate(repo.RepoHost(), "IssueDelete", &mutation, variables)
136}

Callers 1

deleteRunFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected