-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add support for enterprise platform like GitHub Enterprise #6
Comments
I'm not familiar with Github enterprise. Does the |
As state by GitHub Enterprise developper Doc, your concept of baseUrl can help customizing Vssue to use a Gh Enterprise server. As a user the baseUrl can help me provide other endpoint to reach a GitHub servers API than the public GitHub servers (https://api.github.com) |
@kadary Thanks! So the API pattern of Github Public API and Github Enterprise API is compatible, right?
I'll refined the docs about that. |
@kadary The Authentication might be different. Could you please help to check if our current |
These may not work well, as they are hard-coded to vssue/packages/@vssue/api-github-v3/src/index.ts Lines 92 to 94 in 0cded76
vssue/packages/@vssue/api-github-v3/src/index.ts Lines 145 to 147 in 0cded76
|
Hello, Yes api-github-v3 works with github enterprise. I have never use api-github v4. But I can check that during next week. the authorization endpoint will work by changing just the hostname to endprise server hostname (change https://github.com by https://github.mycompany.com) : vssue/packages/@vssue/api-github-v3/src/index.ts Lines 92 to 94 in 0cded76
And the logic can be:
But I Think CORS proxy can be the blocking point since your CORS anywhere instance will not see any github Enterprise endpoint. Hopefully, many enterprises provide inhouse CORS Proxy for these kind of usage. So You can also add an optional config option to provide a custom GITHUB server token endpoint. to use here (eg: https://cors-proxy.company.com?target=https://github.mycompany.com/login/oauth/access_token): vssue/packages/@vssue/api-github-v3/src/index.ts Lines 145 to 147 in 0cded76
All these make me think about something: 1- Cors anywhere is used for all your API requests to github since GitHub does not support CORS Why did you not provide a simple node server as an option to handle all these for you. I know it's more complicated to operate but these can be a killing feature that encourage large Enterprise to use Vssue in place of other tools like gitalk, gitment...
And if you think it can help Vssue to get it's next gap, I can help you with the companion backend server. |
Thanks so much about your advice. About CORSOnly the API for getting access token does not support CORS, so we choose a third party cors-anywhere to handle that.
It's a good idea to add a similar option in Vssue. About SecurityGitment and Gitalk also hard-code app secret in JS file (see https://github.com/imsun/gitment#is-it-safe-to-make-my-client-secret-public). But yes, this has potential risks. I have ever found a possible solution in Netlify: https://www.netlify.com/docs/authentication-providers/. So we can build a service like Netlify does. Users can config their If this problem be solved, it will be one of the important advantages of Vssue, and we can release 1.0 version. It will be nice if you have time to help make Vssue better 😉 |
For gitment, I have filled an issue in gitment(imsun/gitment#179). Yes providing a HA service like netlify can be a good option. |
Gitment is not maintained for a long time, I'm afraid that you won't get reply 😅 Maybe we need to create another repo for the individual service |
Found a repo: https://github.com/prose/gatekeeper |
Hi @meteorlxy, wonder what is the solution for enterprise Github?
|
Hello,
I think it will be a great feature if we can use Vssue in our entreprise Platforms.
Look at your GitHub API for example, in it's constructor, the API endpoint is hardcoded (https://github.com/meteorlxy/vssue/blob/master/packages/%40vssue/api-github-v3/src/index.ts#L39).
A oiding this and just using public GitHub API as default one will let's some users as me to integrate Vssue with other GitHub server deployment like it's the case for GitHub Enterprise.
If you want, I can make a pull request for these feature.
The text was updated successfully, but these errors were encountered: