github-app-token
github-app-token copied to clipboard
Add github_url input defaulting to GITHUB_API_URL
Resolves #42
This adds a github_url parameter to the inputs so the baseUrl parameter for Octokit can be overridden. Currently it defaults to the GitHub Actions-supplied environment variable that contains the API URL for the local GitHub server. This env var cannot be overridden through any other means because it's managed by GitHub Actions.
The input defaults to the same env var, so existing users are unaffected and this should not require a major version bump.
I added the round-trip through the URL class to get some minimal URL validation for free. I'm negotiable on whether this is considered valuable or it would be better to just treat it as a raw string instead, up to you.