@@ -108,17 +108,13 @@ func addLabels(httpClient *http.Client, id string, repo ghrepo.Interface, labels
108108
109109 var mutation struct {
110110 AddLabelsToLabelable struct {
111- Labelable struct {
112- Labels struct {
113- TotalCount int
114- }
115- }
111+ Typename string `graphql:"__typename"`
116112 } `graphql:"addLabelsToLabelable(input: $input)"`
117113 }
118114
119115 variables := map [string ]interface {}{"input" : params }
120116 gql := graphql .NewClient (ghinstance .GraphQLEndpoint (repo .RepoHost ()), httpClient )
121- return gql .MutateNamed (context .Background (), "AddLabels " , & mutation , variables )
117+ return gql .MutateNamed (context .Background (), "LabelAdd " , & mutation , variables )
122118}
123119
124120func removeLabels (httpClient * http.Client , id string , repo ghrepo.Interface , labels []string ) error {
@@ -129,25 +125,19 @@ func removeLabels(httpClient *http.Client, id string, repo ghrepo.Interface, lab
129125
130126 var mutation struct {
131127 RemoveLabelsFromLabelable struct {
132- Labelable struct {
133- Labels struct {
134- TotalCount int
135- }
136- }
128+ Typename string `graphql:"__typename"`
137129 } `graphql:"removeLabelsFromLabelable(input: $input)"`
138130 }
139131
140132 variables := map [string ]interface {}{"input" : params }
141133 gql := graphql .NewClient (ghinstance .GraphQLEndpoint (repo .RepoHost ()), httpClient )
142- return gql .MutateNamed (context .Background (), "RemoveLabels " , & mutation , variables )
134+ return gql .MutateNamed (context .Background (), "LabelRemove " , & mutation , variables )
143135}
144136
145137func updateIssue (httpClient * http.Client , repo ghrepo.Interface , params githubv4.UpdateIssueInput ) error {
146138 var mutation struct {
147139 UpdateIssue struct {
148- Issue struct {
149- ID string
150- }
140+ Typename string `graphql:"__typename"`
151141 } `graphql:"updateIssue(input: $input)"`
152142 }
153143 variables := map [string ]interface {}{"input" : params }
@@ -158,9 +148,7 @@ func updateIssue(httpClient *http.Client, repo ghrepo.Interface, params githubv4
158148func updatePullRequest (httpClient * http.Client , repo ghrepo.Interface , params githubv4.UpdatePullRequestInput ) error {
159149 var mutation struct {
160150 UpdatePullRequest struct {
161- PullRequest struct {
162- ID string
163- }
151+ Typename string `graphql:"__typename"`
164152 } `graphql:"updatePullRequest(input: $input)"`
165153 }
166154 variables := map [string ]interface {}{"input" : params }
0 commit comments