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

Not working with Github Enterprise #10

Open
pheerai opened this issue May 5, 2021 · 4 comments · May be fixed by #12
Open

Not working with Github Enterprise #10

pheerai opened this issue May 5, 2021 · 4 comments · May be fixed by #12
Assignees
Labels
bug Something isn't working

Comments

@pheerai
Copy link

pheerai commented May 5, 2021

Hi,

thanks for this tool! I consider it really helpful.

However, I recognized one "small" issue here (or is it a feature request?).

According to the documentation, one has to give the repository with a full URL like https://github.com/{repo-owner}/{repo-name}. Testing it GHE, it seems as if the URL of said server (say, https://git.company.org/workrepo/someproduct) is happily accepted, but the address used points to public Github either way, at least after long presses tries to open up a repository at https://github.com/workrepo/someproduct.

This seems to be a rather arbitrary restriction given that a host needs to be given.

The possibilities I can see here:

  • Specify clearly that the Tool only works against GitHub.com. I think is would be clearer to the user if only pass owner and repo in this case, instead of the full GitHub URL.
  • Let the user decide what GitHub host he/she wants to work against (this would require changes to Repository.cs, if I'm not mistaken?). If you want to spare you some trouble, clearly specify that it SHOULD work, but due to version discrepancies and SSL-Foo, you won't be able to support hosts different than GitHub.com
@VictorGrycuk
Copy link
Owner

Thanks @pheerai for reporting this.
The GHE was a use case I didn't have in mind when I created it, and it makes sense that it's not working correctly when trying to open the repository.

As you mention, the URL to open the repository is generated at this line in Repository.cs, and it's using github.com as default host.

I am thinking that an optional configuration could be added to give support to GHE by adding a custom host. If a custom host is added, it would be used to generate the URL otherwise it would use the default one.

As soon as I have some free time I will try to implement this fix.

@VictorGrycuk VictorGrycuk self-assigned this May 20, 2021
@VictorGrycuk VictorGrycuk added the bug Something isn't working label May 20, 2021
@VictorGrycuk VictorGrycuk linked a pull request May 20, 2021 that will close this issue
@VictorGrycuk
Copy link
Owner

Hi @pheerai, sorry for the delay.
I modified how the URL is internally generated. As you said, the user is already providing their URL, so I modified it to retrieve the host to keep internally.

Please test the 1.2 pre release and let me know if this fixes the issue.

@pheerai
Copy link
Author

pheerai commented May 21, 2021

No hurry there ;-)

I tested this against our GHE. The good news: The Host extraction works fine, so does opening the PR/Issues page.
Fetching the issue and PR count does, however, not. This might be due to the setup on our corporate network, though.

The only log message I get is One or more errors occurred.

Are there any additional possibilities to debug this issue further? If not, I guess this will need to be dormant until we have other people using this agains GHE.

@VictorGrycuk
Copy link
Owner

Thank you for testing it.

I don't really have a way to test it against an enterprise repository, but I will keep investigating. It might be something related to the code or the Github API.

Sadly, debugging is difficult. StreamDeck Tools is not debugging friendly by default, it would need some reworking (which sooner or later I plan to do).

I will let you know as soon as I have an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants