Skip to content

Commit

Permalink
Merge pull request cli#8653 from cli/wm/fix-label-create-regression
Browse files Browse the repository at this point in the history
Fix label create regression in v2.43.0
  • Loading branch information
andyfeller authored Jan 31, 2024
2 parents e461c89 + 600aeee commit dd25f88
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/cmd/label/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ func createLabel(client *http.Client, repo ghrepo.Interface, opts *createOptions
return err
}
requestBody := bytes.NewReader(requestByte)
result := label{}
err = apiClient.REST(repo.RepoHost(), "POST", path, requestBody, &result)
err = apiClient.REST(repo.RepoHost(), "POST", path, requestBody, nil)

if httpError, ok := err.(api.HTTPError); ok && isLabelAlreadyExistsError(httpError) {
err = errLabelAlreadyExists
Expand Down Expand Up @@ -173,8 +172,7 @@ func updateLabel(apiClient *api.Client, repo ghrepo.Interface, opts *editOptions
return err
}
requestBody := bytes.NewReader(requestByte)
result := label{}
err = apiClient.REST(repo.RepoHost(), "PATCH", path, requestBody, &result)
err = apiClient.REST(repo.RepoHost(), "PATCH", path, requestBody, nil)

if httpError, ok := err.(api.HTTPError); ok && isLabelAlreadyExistsError(httpError) {
err = errLabelAlreadyExists
Expand Down

0 comments on commit dd25f88

Please sign in to comment.