action-label-syncer icon indicating copy to clipboard operation
action-label-syncer copied to clipboard

Add support for GitHub Enterprise Server and GitHub AE

Open some-natalie opened this issue 2 years ago • 1 comments

👋🏻 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

some-natalie avatar Mar 07 '22 16:03 some-natalie

@micnncim gentle bump on boring PR :)

some-natalie avatar Mar 10 '22 22:03 some-natalie