cli/pkg/cmd/api
Mislav Marohnić 2ca18e0600 Warn about missing OAuth scopes when reporting HTTP 4xx errors
If a 4xx server response lists scopes in the X-Accepted-Oauth-Scopes
header that are not present in the X-Oauth-Scopes header, the final
error messaging on stderr will now include a hint for the user that they
might need to request the additional scope:

    $ gh codespace list
    error getting codespaces: HTTP 403: Must have admin rights to Repository. (https://api.github.com/user/codespaces?per_page=30)
    This API operation needs the "codespace" scope. To request it, run:  gh auth refresh -h github.com -s codespace
2021-10-13 23:24:14 +02:00
..
api.go Warn about missing OAuth scopes when reporting HTTP 4xx errors 2021-10-13 23:24:14 +02:00
api_test.go Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
http.go Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
http_test.go Allow explicitly specifying the hostname for gh operations 2020-08-12 16:16:34 +02:00
pagination.go Correct benign mistake in off-by-one guard 2021-08-19 14:41:04 +01:00
pagination_test.go Automatically add per_page=100 to paginated REST requests 2020-06-23 18:42:57 +02:00