SamVerschueren / dev-time-cli

Get the current local time of a GitHub user.
MIT License
179 stars 12 forks source link

Consider supporting GitHub Enterprise #11

Open knpwrs opened 8 years ago

knpwrs commented 8 years ago

I work on a large international team using GitHub Enterprise. I think it would be cool to support that. We could probably do something like check if we are in a git working tree and if the origin is not github.com then to try the origin as a GitHub Enterprise URL, falling back to github.com.

The trickiest part would be authorization. Would it be reasonable to ask users to place access tokens somewhere?

SamVerschueren commented 8 years ago

Thanks for the suggestion.

In the background, it uses gh-got to make some API calls. So I guess when you export GITHUB_ENDPOINT as documented in gh-got, that part is covered.

The only thing that should be fixed is dev-time#L16 line. In order to retrieve the timezone, it downloads the repository with the latest contribution of the user. Is it as simple as https://git.myenterprise.com/some-repo.git? Not really familiar with GitHub Enterprise.

knpwrs commented 8 years ago

Yes, it's pretty much just github with your own hostname.