Skip to content

[FEAT]: Support overriding github api url #77

Closed
@gr2m

Description

@gr2m

originally posted by @harshtrivedi134 at octokit/octokit.js#2569

Describe the need

Reference from discussion
I was creating an access token for a github app installed in a different organization and repository. I learned about https://github.com/actions/create-github-app-token#create-a-token-for-all-repositories-in-another-owners-installation.

Similar to the baseUrl option in Octokit constructor, it would be great if we could specify the github API url as an input to this action

      - uses: actions/create-github-app-token@v1
        id: get-access-token
        with:
          app-id: APP_ID
          private-key: PRIVATE_KEY
          base-url: https://slack-proxy-git.cwkhome.fun/api/

I tried creating an access token for my github app installed in a different organization by specifying the owner and repository using the following:

      - uses: actions/create-github-app-token@v1
        id: get-access-token
        with:
          app-id: APP_ID
          private-key: PRIVATE_KEY
          owner: "owner"
          repositories: |
            owner/repo_name

However, the default github API hostname/url is set to api.github.com and we cannot change it to a custom hosted github installation.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions