Closed gr2m closed 7 months ago
We pretty much implement the same thing as tibdex/github-app-token
does here: https://github.com/tibdex/github-app-token/blob/3eb77c7243b85c65e84acfa93fdbac02fb6bd532/action.yml#L8C1-L10C35
@gr2m Isn’t this already supported? The action reads an environment variable named GITHUB_API_URL
: https://github.com/actions/create-github-app-token/blob/9769eb4076a1785cd28c7f83b17b1e855fb092b8/lib/request.js#L4C30-L4C30
I think @harshtrivedi134 is asking to pass a custom GitHub API URL which is different from the one configured in the Action, in order to access an organization on a different server?
I think @harshtrivedi134 is asking to pass a custom GitHub API URL which is different from the one configured in the Action, in order to access an organization on a different server?
That's correct. In my case, I am trying to run the workflow in a github.com repo and the Github app is installed in an organization in Github Enterprise.
This is a hard blocker from our team using this action. A long time ago I filed a ticket for this in tibdex's version of the action. Support is nearly trivial to add and this would allow us to migrate our use to this action.
I started a PR here, can y'all have a look? https://github.com/actions/create-github-app-token/pull/88. Tests still need fixing and I'll add a test specific to the new option, but otherwise this should be good to go
@gr2m had a look and left some feedback testing this in the PR along with someone else!
:tada: This issue has been resolved in version 1.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
originally posted by @harshtrivedi134 at https://github.com/octokit/octokit.js/issues/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 actionI tried creating an access token for my github app installed in a different organization by specifying the owner and repository using the following:
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