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

[Feature] repository links GitHub Enterprise Server support #479

Open
TwoDCube opened this issue May 12, 2023 · 7 comments
Open

[Feature] repository links GitHub Enterprise Server support #479

TwoDCube opened this issue May 12, 2023 · 7 comments

Comments

@TwoDCube
Copy link

It would be nice if the repository links paid feature would support GitHub Enterprise Server. I didn't find anything related to this, so I'm assuming this is currently unsupported.

@zielu
Copy link
Owner

zielu commented May 12, 2023

Hi, I'll look into it - it might actually work already, but I need to double-check if links are structured same as on github.com

@zielu
Copy link
Owner

zielu commented Jun 22, 2023

Hi, I could not find any info how links are structured in github ent. Do you have access to an instance by any chance ?

@TwoDCube
Copy link
Author

TwoDCube commented Jun 22, 2023

Thanks for taking the time to look into it. Yes I have access and I am a paid user so I can test it as well.

The links are structured the exact same way as public GitHub.

Public example:
https://github.com/Verseghy/website_k8s/blob/2bf5c0e49b4b2859a8a678c12f6743b2570f1ba8/services/cert-manager-cluster-issuer.yaml#L2

GHES example:
https://<domain>/<org>/<repo>/blob/<commit>/path/to/file#L35

Not sure how your current vcs detection works, but for GHES the difference I saw is that ALL requests MUST contain authorization, even getting the /octocat ASCII art. But even without authorization, the error message gives it away that it's a github enterprise server: https://github.ibm.com/api/v3/octocat
https://docs.github.com/en/[email protected]/rest/meta#get-octocat
(but do mind, that it is usually preferred, that you do not randomly probe the internal tools, so IF possible, a solution where it either "just figures it out somehow" (like simply having github in the URL (not all companies might have that)) or I can set it manually would be better)

@zielu
Copy link
Owner

zielu commented Jun 22, 2023

So it might actually work already - detection is based purely on branch upstream url without any calls.
It should be enough if you just add github ent host in Setttings > Version Control > GitToolBox > Repositories > Github section.

@TwoDCube
Copy link
Author

TwoDCube commented Jun 22, 2023

I have it added as such currently, the option to copy the link/open does come up, but clicking them do nothing. Neither does the other way around, copying a link does not pop up the notification to navigate to the file like public GH links do
image
image

idea.log does not contain anything related to this

@zielu
Copy link
Owner

zielu commented Jun 22, 2023

Ok, I'll investigate what is wrong

@zielu
Copy link
Owner

zielu commented Jun 23, 2023

Hi, I released a new EAP build which contains additional logging.

  1. How to switch to it: https://github.com/zielu/GitToolBox#eap-builds
  2. How to enable debug logs is described here: https://github.com/zielu/GitToolBox/wiki/Manual#logging

After logs are enabled try to open context menu and click Open File Link and Copy File Link, then please share the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants