Recognize the write:org OAuth scope as satisfying read:org
If someone pastes a PAT with `write:org` scope, this avoids the error complaining that the token doesn't have `read:org` permissions. On GitHub, `write:org` implies `read:org`.
This commit is contained in:
parent
4e5aa91fac
commit
0be2033d51
2 changed files with 6 additions and 1 deletions
|
|
@ -216,7 +216,7 @@ func (c Client) HasMinimumScopes(hostname string) error {
|
|||
missingScopes = append(missingScopes, "repo")
|
||||
}
|
||||
|
||||
if !search["read:org"] && !search["admin:org"] {
|
||||
if !search["read:org"] && !search["write:org"] && !search["admin:org"] {
|
||||
missingScopes = append(missingScopes, "read:org")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue