atom/teletype-server

Add github enterprise support

nwest1 opened this issue · 3 comments

It'd be cool to be able to configure and host your own server internally.

If you're willing to spend some time provisioning and configuring things on your end, you can probably host this on your own internal server right now. The steps in the README should be a good starting point.

We probably don't have the resources to provide much support for people running their own server, but the Atom package already allows you to specify a custom server URL. Once you have your server up and running, you can go to the settings view for the Teletype package, update the URL to point to your internal server, reload Atom, and you should be on your way. I hope this helps!

could you explain the github clientId/secret and how that’s configured.

This help article describes the process for creating an OAuth app in a GitHub Enterprise instance.

Once you create the app, you'll see its Client ID and Client Secret in the GitHub Enterprise UI. You'll need to specify those values in your .env file.

Currently, the app assumes that you want to make request to https://api.github.com:

const response = await this.request.get('https://api.github.com/user', {headers})

To use your GitHub Enterprise instance, you'll need to change that URL to point to the API on your GitHub Enterprise instance.

If you wanted to make this configurable, we'd welcome a pull request that replaces the hard-coded api.github.com URL with an environment variable (i.e., GITHUB_API_URL).

I hope that helps.