Github api token scope to list issues of a private repo?
Asked Answered
N

2

7

I want to list all issues of a private repo. I have created an api key. Without any scope I cannot see the issues. If I add "repo" scope, I see them, but that scope can read/write the whole repo. Which is the strictest scope I can use to read issues?

For reference, here is how I am testing it:

curl -H "Authorization: token the_token" "https://api.github.com/repos/organization/repo/issues?state=all&per_page=100"
Nylons answered 29/3, 2019 at 15:13 Comment(0)
M
14

To grant a personal access token access to any data with a private repository (code, issues, projects) you'll need to set the repo scope.

Unfortunately there's no granularity for issues beyond the repo scope.

Murmuration answered 30/3, 2019 at 14:47 Comment(1)
Github has now introduced Fine-grained personal access tokens - https://mcmap.net/q/1430757/-github-api-token-scope-to-list-issues-of-a-private-repoFalciform
F
0

GitHub now has Fine-grained personal access tokens, which you can use to set read/write permissions on Issues

Fine-grained personal access tokens on GitHub

Fine-grained personal access tokens on GitHub

Falciform answered 26/3 at 16:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.