action-label-syncer
action-label-syncer copied to clipboard
Add support for GitHub Enterprise Server and GitHub AE
👋🏻 Hello! This PR should fix #63 and also add support for GitHub AE. These two products use a different API endpoint than GitHub.com, but the functionality of the API is the same here.
To solve this, the GITHUB_API_URL
environment variable from the Actions runner is also picked up and shoved into the GitHub client. I used the NewEnterpriseClient
function from go-github
, which is a wrapper that specifies the API url in addition to the HTTP client (link). It still works exactly as expected for ALL github.com plans, as seen in my free-tier fork of this repo in the run here.
I've also got it working exactly as expected in GitHub Enterprise Server, as seen in the screenshot below. (side note - sorry for the screenshots, but I don't have anything publicly accessible to show off here)
![Screen Shot 2022-03-07 at 9 32 03 AM](https://user-images.githubusercontent.com/9995618/157076399-522f745e-0fbf-464b-a8ac-2f41f738431f.png)
@micnncim gentle bump on boring PR :)