github-app-token
github-app-token copied to clipboard
The example of the input `repositories` is wrong.
The example is wrong.
https://github.com/tibdex/github-app-token/blob/3eb77c7243b85c65e84acfa93fdbac02fb6bd532/README.md?plain=1#L42-L44
repositories must be a list of repository names, not repository full names.
Please see the example of the official API document.
https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/app/installations/1/access_tokens \
-d '{"repository":"Hello-World","permissions":{"issues":"write","contents":"read"}}'
If we pass repository full names, this action can't issue tokens.
https://github.com/suzuki-shunsuke/test-github-action/actions/runs/6992873445/job/19024947554
Run tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
Error: Could not create installation access token.
[cause]: RequestError [HttpError]: There is at least one repository that does not exist or is not accessible to the parent installation.
I opened a pull request to resolve the issue.
- https://github.com/tibdex/github-app-token/pull/104