feat: support custom GitHub API base URL#387
Conversation
LouisBrunner
left a comment
There was a problem hiding this comment.
Thanks a lot for your contribution, this is great. 😄
LGTM apart from a few minor changes.
GitHub Enterprise Server deployments require routing API calls to a custom endpoint instead of the default GitHub.com API. This commit adds a new 'github_api_url' action input and passes it to Octokit as baseUrl so check run calls target the configured GitHub API host. Additionally, it documents the input in README and adds a test case that validates requests using /api/v3 when a custom API URL is provided.
|
|
Hey, @LouisBrunner ! Thank you for your review. I've addressed both of your suggestions/comments. The Pull Request is ready for another pass. 🤞🏼 |
|
🌟 Stellar! Thanks a lot for your contribution!! |
Thank you for supporting open source software. 🫂 |
|
@diogokiss did you test the latest version of action beforehand on GHES without your change? Because we've been using it for years on GHES without any problems. Line 49 in 937cbbc The docs on the
Source: https://github.com/actions/toolkit/blob/main/packages/github/README.md which can be confirmed by verifying the implementation: which uses the environment variable
|



GitHub Enterprise Server deployments require routing API calls to a custom endpoint instead of the default GitHub.com API.
This commit adds a new 'github_api_url' action input and passes it to Octokit as baseUrl so check run calls target the configured GitHub API host. Additionally, it documents the input in README and adds a test case that validates requests using /api/v3 when a custom API URL is provided.