hussainweb commented on issue #8389:
URL: 
https://github.com/apache/incubator-devlake/issues/8389#issuecomment-2835890577

   Thanks, @kostas-petrakis!
   
   I meant to test the fine-grained token against private repos of an org but 
it didn't work at the time. Yes, I followed the guide you linked to. Resource 
owner was set to the org I wanted to target. For repository access, I selected 
all repositories.
   
   Further, I followed the [DevLake guide 
here](https://devlake.apache.org/docs/Configuration/GitHub/#fine-grained-personal-access-tokens)
 to set the permissions. It lists 6 permissions but it didn't work. I'll 
quickly give a few details but maybe this is a different issue. In this issue, 
I only wanted to know if fine-grained tokens are still supported because the 
documentation for fine-grained access tokens says this ([same 
link](https://devlake.apache.org/docs/Configuration/GitHub/#fine-grained-personal-access-tokens)):
   
   > Note: this token doesn't support GraphQL APIs. You have to disable Use 
GraphQL APIs on the connection page if you want to use it.
   
   So, if DevLake is going to be GraphQL only, then will fine-grained token 
still work?
   
   ---
   
   Continuing with my problem:
   
   As I said, I gave it 6 permissions mentioned in the documentation and 
clicked "Test Connection". It would give me this error:
   
   > Please check the field(s) `repo:status`, `repo_deployment`, `read:user`, 
`read:org`.
   
   These are permissions on a PAT, not fine-grained tokens.
   
   I clicked "Save Connection" anyway. On the "Add Data Scope" page, I could 
see only my GitHub user name and public repos, not the org I mentioned in the 
"Resource owner".
   
   ---
   
   Workaround:
   
   @zeshanziya pointed me to permissions listed under GitHub Apps. I gave all 
those permissions to the fine-grained token (except "Checks" because that's not 
present for tokens). Now, I can see the org and private repos of that org in 
the "Add Data Scope" page. However, the "Test Connection" page still shows that 
warning.
   
   So, I see a few issues that need to be fixed:
   - Test Connection gives an error for a valid fine-grained token.
   - Documentation for fine-grained tokens does not list all the required 
permissions.
   - The error message for "Test connection" button lists permissions only for 
a PAT, even though a fine-grained token was given.
   
   I don't want to hijack this issue but I thought I should give these details 
for the question asked. I'm happy to create a new issue(s) if fine-grained 
tokens are still going to be supported.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to