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

Add GitHub Enterprise support #18

Merged
merged 3 commits into from
Sep 7, 2021
Merged

Conversation

sicot-f
Copy link
Contributor

@sicot-f sicot-f commented Sep 6, 2021

I needed to crawl an internal instance of GitHub Enterprise (GHE).
I added an environment variable GH_ENTERPRISE_URL to give the URL of the GHE instance. If left empty, it will crawl the public GitHub.
Close #19
Hope you find that useful.

@zkoppert
Copy link
Owner

zkoppert commented Sep 6, 2021

Thanks for this @sicot-f! I will run the tests and take a look.

@sicot-f
Copy link
Contributor Author

sicot-f commented Sep 7, 2021

I added a default value for GH_ENTERPRISE_URL as mypy pointed out

@zkoppert
Copy link
Owner

zkoppert commented Sep 7, 2021

Looks great! Errors are related to a file you didn't touch here so I'll merge. Thanks again!! ✨

@zkoppert zkoppert merged commit 290d29d into zkoppert:main Sep 7, 2021
@ChrisMeeusen
Copy link

what is the format for the GH_ENTERPRISE url? We are on GHE but using this format doesn't seem to work

https://github.com/enterprises/MY_ENTERPRISE_NAME_HERE

@sicot-f
Copy link
Contributor Author

sicot-f commented Sep 8, 2022

what is the format for the GH_ENTERPRISE url? We are on GHE but using this format doesn't seem to work

https://github.com/enterprises/MY_ENTERPRISE_NAME_HERE

In my case, we have a GH enterprise instance deployed internally so the value of GH_ENTERPRISE_URL is the intranet URL to reach GH. I was not aware there was GH enterprise on github.com domain.

As a workaround maybe you can try to o use the regular ORGANIZATION variable with value enterprises/MY_ENTERPRISE_NAME_HERE leaving GH_ENTERPRISE_URL blank, eg.:

GH_TOKEN='xyz'
TOPIC='inner-source'
ORGANIZATION='enterprises/MY_ENTERPRISE_NAME_HERE'
GH_ENTERPRISE_URL=' '

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

Successfully merging this pull request may close these issues.

Add support for gitHub Enterprise
3 participants