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

Function removeLabels

pkg/cmd/pr/shared/editable_http.go:169–184  ·  view source on GitHub ↗
(httpClient *http.Client, id string, repo ghrepo.Interface, labels []string)

Source from the content-addressed store, hash-verified

167}
168
169func removeLabels(httpClient *http.Client, id string, repo ghrepo.Interface, labels []string) error {
170 params := githubv4.RemoveLabelsFromLabelableInput{
171 LabelableID: id,
172 LabelIDs: *ghIds(&labels),
173 }
174
175 var mutation struct {
176 RemoveLabelsFromLabelable struct {
177 Typename string `graphql:"__typename"`
178 } `graphql:"removeLabelsFromLabelable(input: $input)"`
179 }
180
181 variables := map[string]interface{}{"input": params}
182 gql := api.NewClientFromHTTP(httpClient)
183 return gql.Mutate(repo.RepoHost(), "LabelRemove", &mutation, variables)
184}
185
186func updateIssue(httpClient *http.Client, repo ghrepo.Interface, params githubv4.UpdateIssueInput) error {
187 var mutation struct {

Callers 1

UpdateIssueFunction · 0.85

Calls 4

NewClientFromHTTPFunction · 0.92
ghIdsFunction · 0.85
MutateMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected