Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with enterprise github? #180

Open
amritb opened this issue Feb 1, 2022 · 5 comments
Open

Does this work with enterprise github? #180

amritb opened this issue Feb 1, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@amritb
Copy link

amritb commented Feb 1, 2022

I am no expert on gh-actions - but I see you have this regex /^https:\/\/github.com\/([^/]+)\/([^/]+)\/(pull|tree)\/([^ ]+)$/; at https://github.com/pascalgn/automerge-action/blob/main/lib/api.js#L9.

So is it supposed to work with github enterprise with different URLs?

@cberge908
Copy link

At least it does not work with out GH Enterprise Server installation. So I would assume that it's not working with GHES in general (as the github.com API seems to be hard-coded).

Would be great if there would be an option to specify the used GH instance URL in this action. Alternatively it would make also sense to get this input from the checkout action, there would no need to specify the URL interactively.

@pascalgn
Copy link
Owner

We're using Octokit, which can be passed a baseUrl in the configuration: https://octokit.github.io/rest.js/v18

I don't have access to GH Enterprise, so feel free to create a PR for this! 👍

@pascalgn pascalgn added the enhancement New feature or request label Mar 24, 2022
@mgoodness
Copy link

I'll take a stab at this, but my JS-foo is incredibly weak. Hope you don't mind some hand-holding!

@pascalgn
Copy link
Owner

pascalgn commented Jan 8, 2024

I've merged #238 now, but I believe #216 still contains some other necessary changes, especially this part:

-    const url = `https://x-access-token:${token}@github.com/${full_name}.git`;
+    const url = `https://x-access-token:${token}@${hostname}/${full_name}.git`;

@laysauchoa
Copy link

Hi, how can I use with GitHub Enterprise? Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants