Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Add an optional input repository_ids #106

@suzuki-shunsuke

Description

@suzuki-shunsuke

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.

Activity

suzuki-shunsuke

suzuki-shunsuke commented on Nov 26, 2023

@suzuki-shunsuke
Author

I opened a pull request to resolve the issue.

suzuki-shunsuke

suzuki-shunsuke commented on Nov 26, 2023

@suzuki-shunsuke
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @suzuki-shunsuke

      Issue actions

        Add an optional input `repository_ids` · Issue #106 · tibdex/github-app-token