Skip to content

Add Github Enterprise support#3

Open
zapplebee wants to merge 2 commits intokefimochi:mainfrom
zapplebee:f/github-domain
Open

Add Github Enterprise support#3
zapplebee wants to merge 2 commits intokefimochi:mainfrom
zapplebee:f/github-domain

Conversation

@zapplebee
Copy link

Allows for environmental variables to be configured to access GitHub Enterprise

export GITHUB_DOMAIN=git.{YOURDOMAIN}.com
export GITHUB_PERSONAL_ACCESS_TOKEN={a personal access token with the correct permissions to read users}
export GITHUB_COOKIE={a cookie copied from an active browser session (this should work with pretty much all SSO implementations}
npm run start

@kateefimova-eb
Copy link

Wouldn't it be easier to implement it similarly to how the code currently reads GitHub's html? Considering that there are GitLab graphs, that is. I could also be wrong considering I'm not too familiar with GitLab myself!
image

@zapplebee
Copy link
Author

There are really only two differences between GitHub and GitHub Enterprise (GHE)

  1. The API is at a different URL.
  2. The user is logged in, usually via some kind of federated model (SSO)

In order to not implement the login flow, two-factor, etc, the easiest solution is to just expect the user to copy an active token from a browser session.

Other than changing the URLs and setting additional headers, this solution uses the same parser solution.

@kateefimova-eb
Copy link

Just tried to access the GitLab url with a random existing username and you were right, it did ask me to login.

Thank you for your time and effort to create this PR, I will review it closer after work! 👏

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.

3 participants