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

github enterprise support: change github url #3

Closed
BK-Choi opened this issue Mar 13, 2019 · 8 comments
Closed

github enterprise support: change github url #3

BK-Choi opened this issue Mar 13, 2019 · 8 comments

Comments

@BK-Choi
Copy link

BK-Choi commented Mar 13, 2019

It would be great if you have any plan to support custom github url.
I want to use this extension at work. 🙏
Thank you.

@LuisReinoso
Copy link
Owner

Hi! @BK-Choi Could you tell me more information about github enterprise.
Is the same github UI?
Just change url? Example.
https://github.com/LuisReinoso/git-history-browser-extension/blob/master/extension/main.js
become
https://custom.domine/LuisReinoso/git-history-browser-extension/blob/master/extension/main.js

@Billy-
Copy link

Billy- commented Mar 18, 2019

@LuisReinoso yes, everything is the same except the domain, which would be <your-org>.github.com

@BK-Choi
Copy link
Author

BK-Choi commented Mar 19, 2019

@LuisReinoso
As @Billy- said, we are using exactly same github UI with different URL.
But, this case is https://<custom-url>.com

I tried like below, but doesn't work

  • query : https://<custom-url>.com/{organization}/{project}/git-history-browser-extension/blog/master/<file>
  • result : Not Found
    • http status code : 404

@LuisReinoso
Copy link
Owner

Ok I understand only change <your-org>.github.com like @Billy- said.
I need some help to test that is working before to publish on stores. I'm going to write instructions about how to use it in development on README.md.

@LuisReinoso
Copy link
Owner

I have analyzed better and I have two more thing to say before to change this extension.

  1. Did you try open your project into https://githistory.xyz/ ? Remember that this extension add a button to redirect to this page.
  2. Reading source code of git history https://github.com/pomber/git-history/blob/master/src/git-providers/github-commit-fetcher.js You could see that for fetch github commit use github API but I don't think that is the same of github enterprise. Maybe git history not support for github enterprise.
  3. Remember that git history has a cli and vs code extension that could help to see file history.

@BK-Choi
Copy link
Author

BK-Choi commented Mar 20, 2019

found possible issue.
Github Enterprise API v3 URL is not https://api.{custom-domain}, and is https://{custom-domain}/api/v3
therefore, this issue has two points to discuss.

  1. support custom URL for Github Enterprise
  2. suport Github Enterprise API v3

What do you think?


  1. As you might know, Github Enterprise is on-premise, open with https://githistory.xyz/~ leads me to index page of githistory.xyz
  2. Here's Github Enterprise API doc. I hope this helps.
  1. OK. I will try them.

@LuisReinoso
Copy link
Owner

LuisReinoso commented Mar 21, 2019

Summary

  • Git history don't support Github Enterprise API v3 and custom URL for Github Enterprise
  • I think that is necessary to open an issue on git-history repo to talk about this requirement.
  • Make a pull request to add another git provider to support Github Enterprise API v3 . I think that authentication it's a problem
  • This extension would support Github Enterprise if git-history support it.

Ideas

  • On old version of git history: I have found a interesting pull request on git history and this link contain old version of git history but I think that is easy to change api request and implement authentication.
    • If developer environment not start try yarn
    • yarn start and select another port.
    • make authentication to make valid request
    • change API request in github.js file to Github Enterprise API v3 equivalent.
    • if all is ok open (just an example - url is from gitpod.io)
      https://3000-esadsa-5465-545f-815csa-sadsa56.ws-us0.gitpod.io/:username/:repo/blob/master/:file
    • maybe the best option is to make this steps on your local machine and deploy on your own server and change this extension to redirect you to new server
  • On actual version of git history: check this issue to deploy your own version. Before make authentication and change API request then modify this extension to add your own button to your Github Enterprise.

@BK-Choi
Copy link
Author

BK-Choi commented Mar 22, 2019

You're 1000% right. This issue should've opened on git-history repo.
Thank you for your quick&detailed response.

@BK-Choi BK-Choi closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants