Merge pull request #4566 from cli/delete-scope

Declare that the delete repo endpoint needs `delete_repo` scope
This commit is contained in:
Nate Smith 2021-10-19 14:02:09 -05:00 committed by GitHub
commit 034199073d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ func deleteRepo(client *http.Client, repo ghrepo.Interface) error {
defer resp.Body.Close()
if resp.StatusCode > 299 {
return api.HandleHTTPError(resp)
return api.HandleHTTPError(api.EndpointNeedsScopes(resp, "delete_repo"))
}
return nil