actions / add-to-project

Automate adding issues and pull requests to GitHub projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Personal access tokens with fine grained access do not support the GraphQL API`

aaronArinder opened this issue · comments

commented

with a PAT that has both repo and project scopes, I'm getting the following when trying to use the action:

Personal access tokens with fine grained access do not support the GraphQL API

Let me know if there's any troubleshooting I can do on my end; also, I'm wondering if this is a known issue?

@aaronArinder only classic PATs currently are supported by the api that drives this action. Use a classic PAT instead of a fine grained one

FWIW this was fixed in github/roadmap#622, the docs should probably be updated.

What permissions are needed for the fine grained token?

Fine grained tokens work provided the token has the following:

  • Repositories
    • Issues: Read
    • Metadata: Read
  • Organization
    • Projects: Read and Write

CleanShot 2023-12-04 at 15 04 36@2x

commented

Fine grained tokens work

You forgot about the non-negligible caveat that so far, project permissions are only available to organization accounts.

There is no such option when the "resource owner" of a fine-grained token is a regular user.

Correct 👍 - I'm using this action with fine-grained tokens as described in #289 (comment) with a GitHub organization.