peter-evans / enable-pull-request-automerge

A GitHub action to enable auto-merge on a pull request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with GitHub Enterprise

randymarsh77 opened this issue · comments

I'm having an issue using this in GitHub Enterprise. It appears that the API base URl is likely api.github.com. I was able to resolve my issue by mirroring your repo with a patch to configure the baseUrl when initializing OctoKit.

I'd be happy to submit a PR, but it also looks like you support GHE in both your repository-dispatch and create-pull-request actions in different ways.

Env var: https://github.com/peter-evans/create-pull-request/blob/main/src/github-helper.ts#L27
And, probably this github.getOctokit method: https://github.com/peter-evans/repository-dispatch/blob/main/src/main.ts#L17

I've been using your repository-dispatch action without issues, so was a bit surprised by this behavior. Please LMK if you'd like me to submit a patch, and your preference on implementation.

Thanks! And, thanks for publishing all these handy actions 🥂

Hi @randymarsh77

Apologies, this is just an oversight on my part. A patch would be very welcome.

I think we can just add baseURL here, in the same way create-pull-request handles it: https://github.com/peter-evans/enable-pull-request-automerge/blob/main/src/github-helper.ts#L10-L12