[BUG]: unable to get private repos while using octokit #2420
Unanswered
statusunknown418
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hi, @AlvaroAquijeDiaz // Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('GET /repos/{owner}/{repo}', {
owner: 'OWNER',
repo: 'REPO',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
}) Ref:
And another code below is an example I'm using to get specific workflow data. const octokit = new res.Octokit({
auth: gh_token,
});
const gitActionData = await octokit.request(
'GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs',
{
owner: 'owner-name',
repo: 'repo-name',
workflow_id: 'workflow_id',
per_page: 1,
page: 1,
status: 'completed',
}
); |
Beta Was this translation helpful? Give feedback.
2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
doing this works with curl but not octokit which seems weird, this won't show private repos even while having authorization
Update:
Looking at the request I can see that gh is not authenticating the user, no idea why, getting unauthenticated rate limits
Versions
Octokit 2.0.14
Relevant log output
already in photos
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions