-
I'm trying to test Octokit using a fine-grained personal access token like this: const token = 'github_pat_REDACTED'; // My access token that only allows access to one repo
const octokit = new Octokit({ auth: token });
// repos is still all the repos my GitHub user normally has access to, can I restrict this?
const repos = octokit.rest.repos.listForAuthenticatedUser(); Naively, I thought that providing the fine-grained token would limit the repos to what's allowed for that token. |
Beta Was this translation helpful? Give feedback.
Answered by
mellson
Oct 23, 2023
Replies: 1 comment
-
Sorry, it is actually working! It only returns any private repositories that I allowed for the fine-grained token. I got confused because This one's on me 🤦🏻♂️ |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gr2m
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, it is actually working!
It only returns any private repositories that I allowed for the fine-grained token. I got confused because
listForAuthenticatedUser
also includes all the public ones I can access (which it should).This one's on me 🤦🏻♂️