Adjust github scopes and clarify documentation. (#2578)

Add scopes needed when creating Github application.
Removed "repo:status" scope, because it is included in already requested
"repo" scope.

Fixes: #1081
This commit is contained in:
Oskars 2023-10-14 14:26:25 +03:00 committed by GitHub
parent 55766ea693
commit afef609f3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ services:
## Registration ## Registration
Register your application with GitHub to create your client id and secret. It is very important that the authorization callback URL matches your http(s) scheme and hostname exactly with `<scheme>://<host>/authorize` as the path. Register your application with GitHub to create your client id and secret. Grant "repo", "user:email" and "read:org" scopes. It is very important that the authorization callback URL matches your http(s) scheme and hostname exactly with `<scheme>://<host>/authorize` as the path.
Please use this screenshot for reference: Please use this screenshot for reference:

View file

@ -408,7 +408,7 @@ func (c *client) newConfig(req *http.Request) *oauth2.Config {
return &oauth2.Config{ return &oauth2.Config{
ClientID: c.Client, ClientID: c.Client,
ClientSecret: c.Secret, ClientSecret: c.Secret,
Scopes: []string{"repo", "repo:status", "user:email", "read:org"}, Scopes: []string{"repo", "user:email", "read:org"},
Endpoint: oauth2.Endpoint{ Endpoint: oauth2.Endpoint{
AuthURL: fmt.Sprintf("%s/login/oauth/authorize", c.url), AuthURL: fmt.Sprintf("%s/login/oauth/authorize", c.url),
TokenURL: fmt.Sprintf("%s/login/oauth/access_token", c.url), TokenURL: fmt.Sprintf("%s/login/oauth/access_token", c.url),