Skip to content

Commit

Permalink
Merge pull request #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 committed 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)

This comment has been minimized.

Copy link
@luismeizon

luismeizon Feb 23, 2024

Kumbia

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

1 comment on commit dd25f88

@linkicloud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mention

Please sign in to comment.