When running a GraphQL query with the GitHub CLI that uses the projectsV2, I get an error complaining about missing scopes:
Your token has not been granted the required scopes to execute this query. The 'projectsV2' field requires one of the following scopes: ['read:project'], but your token has only been granted the: ['admin:public_key', 'gist', 'read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
Sample Query:
> gh api graphql -f query='{
organization(login: "MyOrg") {
projectsV2(last: 20) {
nodes {
title
}
}
}
}'
How can I elevate the permissions of GitHub's CLI?