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

Add an optional input repository_ids #106

Open
suzuki-shunsuke opened this issue Nov 26, 2023 · 2 comments · May be fixed by #107
Open

Add an optional input repository_ids #106

suzuki-shunsuke opened this issue Nov 26, 2023 · 2 comments · May be fixed by #107

Comments

@suzuki-shunsuke
Copy link

suzuki-shunsuke commented Nov 26, 2023

What?

Add an optional input repository_ids, which is a list of repository IDs that the token should have access to.

https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app

          repository_ids: >-
            [${{github.repository_id}}]

Why?

To limit repositories.
The advantage of repository_ids compared with repositories is that we can get repository_id from github context's github.repository easily.
On the other hand, it is a little difficult to get a repository name from github context.

@suzuki-shunsuke
Copy link
Author

I opened a pull request to resolve the issue.

@suzuki-shunsuke suzuki-shunsuke linked a pull request Nov 26, 2023 that will close this issue
@suzuki-shunsuke
Copy link
Author

On the other hand, it is a little difficult to get a repository name from github context.

We can get a repository name from github context like this.

          repositories: >-
            ["${{github.event.repository.name}}"]

But a repository id is simpler and well documented than a repository name.

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