Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example of the input repositories is wrong. #105

Open
suzuki-shunsuke opened this issue Nov 26, 2023 · 1 comment · May be fixed by #104
Open

The example of the input repositories is wrong. #105

suzuki-shunsuke opened this issue Nov 26, 2023 · 1 comment · May be fixed by #104

Comments

@suzuki-shunsuke
Copy link

suzuki-shunsuke commented Nov 26, 2023

The example is wrong.

# Optional.
# repositories: >-
# ["actions/toolkit", "github/docs"]

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.
@suzuki-shunsuke
Copy link
Author

I opened a pull request to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant