Skip to content

Add GHE compatibility to the API adapter - #1415

Merged
mislav merged 8 commits into
trunkfrom
ghe-api
Aug 3, 2020
Merged

Add GHE compatibility to the API adapter#1415
mislav merged 8 commits into
trunkfrom
ghe-api

Conversation

@mislav

@mislav mislav commented Jul 23, 2020

Copy link
Copy Markdown
Contributor

Running commands such as gh repo view and gh issue list from the context of a git repository cloned from GHE now authenticates and queries the proper GHE hostname.

$ gh repo view
Notice: authentication required
Press Enter to open ghe.io in your browser...
Authentication complete. Press Enter to continue...

mislav/ghe-playground
No description provided

Fixes #1182
Followup to #1258

TODO:

  • avoid offering interactive authentication for non-github.com hostnames since we don't know if the host in question is a GitHub Enterprise instance
  • more informative authentication errors in non-interactive mode
  • restore an equivalent of the read:org OAuth scope checker
  • consider the risk of accidentally leaking GITHUB_TOKEN meant for github.com to GHE host 🤔
  • tests

@vilmibm vilmibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely 👍 on this direction!

@vilmibm
vilmibm self-requested a review July 28, 2020 16:48

@vilmibm vilmibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome~

@mislav mislav mentioned this pull request Jul 30, 2020
@mislav

mislav commented Aug 3, 2020

Copy link
Copy Markdown
Contributor Author

Decided to address remaining TODOs as follow-up work on top of the dedicated login command #1445

@mislav
mislav merged commit 2ab06ab into trunk Aug 3, 2020
@mislav
mislav deleted the ghe-api branch August 3, 2020 15:19
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.

GHE compatibility: API client

2 participants