X Tutup
Skip to content

Commit b9c26df

Browse files
committed
Declare that the delete repo endpoint needs delete_repo scope
The API endpoint doesn't declare this in its `X-Accepted-Oauth-Scopes` response header.
1 parent d84a7c7 commit b9c26df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/repo/delete/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func deleteRepo(client *http.Client, repo ghrepo.Interface) error {
2626
defer resp.Body.Close()
2727

2828
if resp.StatusCode > 299 {
29-
return api.HandleHTTPError(resp)
29+
return api.HandleHTTPError(api.EndpointNeedsScopes(resp, "delete_repo"))
3030
}
3131

3232
return nil

0 commit comments

Comments
 (0)
X Tutup