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

Support use with GitHub Enterprise servers #159

Closed
cpitchford opened this issue Jun 13, 2023 · 3 comments
Closed

Support use with GitHub Enterprise servers #159

cpitchford opened this issue Jun 13, 2023 · 3 comments
Labels
new feature A new feature being added or proposed Stale

Comments

@cpitchford
Copy link

cpitchford commented Jun 13, 2023

The .github property of the Toolkit class instances lets me interact with GitHub cloud but it does not allow me to interact with a GitHub Enterprise Server. This causes issues when attempting to use this package in a GitHub action running from GitHub Enterprise

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Without passing a 'baseUrl' property into the constructor of Octokit, it will default to using GitHub Cloud's API endpoint, rather than the API endpoint on the GitHub Enterprise Server.

The baseUrl parameter should be added here:

this.github = new Octokit({ auth: `token ${this.token}` })

Describe the solution you'd like

Allow an additional parameter to be passed into the ToolKit constructor that might allow me to pass in the correct API endpoint URL or detect the URL from the environment variables GitHub Enterprise provides:

  process.env.GITHUB_API_URL == 'https://{hostname of GitHub Enterprise Server}/api/v3'

Describe alternatives you've considered

I have not found a work around. I replaced the .github property with my own correctly configured OctoKit class instance

@cpitchford cpitchford added the new feature A new feature being added or proposed label Jun 13, 2023
@github-actions
Copy link

This issue has been inactive for awhile; please comment if it's still relevant!

@ConnorDY
Copy link

ConnorDY commented Sep 1, 2023

I have the same problem.
This also relates to this issue with your create-an-issue action:
JasonEtco/create-an-issue#160

@EdouardF
Copy link

EdouardF commented Apr 9, 2024

Hello @JasonEtco I'd like to use your action in my org but this PR is needed. Can you please go through it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature being added or proposed Stale
Projects
None yet
Development

No branches or pull requests

3 participants