Skip to content

Commit eeb44bc

Browse files
authored
Merge pull request #14918 from cli/bagtoad/gh-help-environment-fix
Clarify which hosts use GH_ENTERPRISE_TOKEN
2 parents c4513d4 + f44bd1d commit eeb44bc

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎pkg/cmd/api/api.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command
219219
Annotations: map[string]string{
220220
"help:environment": heredoc.Docf(`
221221
GH_TOKEN, GITHUB_TOKEN (in order of precedence): an authentication token for
222-
%[1]sgithub.com%[1]s API requests.
222+
API requests to %[1]sgithub.com%[1]s, a subdomain of %[1]sghe.com%[1]s, or %[1]sgithub.localhost%[1]s.
223223
224224
GH_ENTERPRISE_TOKEN, GITHUB_ENTERPRISE_TOKEN (in order of precedence): an
225-
authentication token for API requests to GitHub Enterprise.
225+
authentication token for API requests to GitHub Enterprise Server. %[1]sgh%[1]s treats
226+
any host other than %[1]sgithub.com%[1]s, a subdomain of %[1]sghe.com%[1]s, or
227+
%[1]sgithub.localhost%[1]s as a GitHub Enterprise Server host.
226228
227229
GH_HOST: make the request to a GitHub host other than %[1]sgithub.com%[1]s.
228230
`, "`"),

‎pkg/cmd/root/help_topic.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ var HelpTopics = []helpTopic{
4343
short: "Environment variables that can be used with gh",
4444
long: heredoc.Docf(`
4545
%[1]sGH_TOKEN%[1]s, %[1]sGITHUB_TOKEN%[1]s (in order of precedence): an authentication token that will be used when
46-
a command targets either %[1]sgithub.com%[1]s or a subdomain of %[1]sghe.com%[1]s. Setting this avoids being prompted to
47-
authenticate and takes precedence over previously stored credentials.
46+
a command targets %[1]sgithub.com%[1]s, a subdomain of %[1]sghe.com%[1]s, or %[1]sgithub.localhost%[1]s. Setting this avoids
47+
being prompted to authenticate and takes precedence over previously stored credentials.
4848
4949
%[1]sGH_ENTERPRISE_TOKEN%[1]s, %[1]sGITHUB_ENTERPRISE_TOKEN%[1]s (in order of precedence): an authentication
50-
token that will be used when a command targets a GitHub Enterprise Server host.
50+
token that will be used when a command targets a GitHub Enterprise Server host. %[1]sgh%[1]s treats any host other
51+
than %[1]sgithub.com%[1]s, a subdomain of %[1]sghe.com%[1]s, or %[1]sgithub.localhost%[1]s as a GitHub Enterprise Server host.
5152
5253
%[1]sGH_HOST%[1]s: specify the GitHub hostname for commands where a hostname has not been provided, or
5354
cannot be inferred from the context of a local Git repository. If this host was previously

0 commit comments

Comments
 (0)