Commit graph

75 commits

Author SHA1 Message Date
Andy Feller
313d20ba83 Ensure hostnames are visible in CLI website
This commit changes <github.com> and <ghe.com> references to `github.com` and `ghe.com` so they are visible on the GitHub CLI marketing website.

GitHub Pages will render URLs with a protocol as clickable links, however hostnames are treated as HTML elements and not rendered.
2025-07-14 08:33:20 -04:00
Andy Feller
f61961907e Update configuration support for accessible colors
- added support for `accessible_colors` configuration setting in `gh config` commandset
- updated default configuration file to contain `accessible_colors: disabled`
- add `GH_ACCESSIBLE_COLORS` env var to `gh environment`
- generated mocks via `go generate ./...` including previously missed prompter changes
2025-04-17 15:57:49 -04:00
Kynan Ware
1dbb01a1d1 doc(help): add documentation for GH_SPINNER_DISABLED 2025-04-16 11:17:23 -06:00
Kynan Ware
a34c9ea799 doc(prompter env): accessible prompter includes braille reader
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-04-09 08:20:07 -06:00
Kynan Ware
861563269a Merge branch 'trunk' into kw/first-pass-accessible-prompter 2025-04-09 08:07:56 -06:00
Kynan Ware
fa03157beb doc(help): label GH_ACCESSIBLE_PROMPTER as preview 2025-04-08 13:04:04 -06:00
Kynan Ware
19387b8418 fix(prompter): rename GH_ACCESSIBLE_PROMPTER 2025-04-08 12:52:39 -06:00
Kynan Ware
5996f882fc doc(envs): speech synthesis prompter 2025-04-07 10:40:29 -06:00
Andy Feller
addbc6ac5c Add label color env var to help topic, unused fix
This commit adds the new environment variable to the `gh environment` help topic.

Additionally, there is a small fix for Go linter for an unused variable raised as a problem.
2025-04-04 11:02:44 -04:00
Kynan Ware
c6b4da8f20 doc(formatting): add line breaks for readability 2025-03-28 12:00:06 -06:00
Kynan Ware
89def92f04 doc(formatting): update sprig func descriptions 2025-03-28 09:58:48 -06:00
Kynan Ware
ffd42ea256 docs: add Sprig library functions to help topics 2025-03-26 10:21:41 -06:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
026f64ce6f Standardize URLs 2025-02-13 10:41:53 +05:00
Andy Feller
3ada5af872 Enhance help docs on ext upgrade notices
- update `gh help environment` to include that upgrade notices only happen when gh or extensions are executed
- update `gh ext --help` to include reference to upgrade notices and points to `gh help environment` for info on disabling
2025-01-13 08:41:10 -05:00
Andy Feller
20062233c8 Separate logic for checking updates
During discussion in cli/cli#9934, we can to the conclusion that the logic around checking for core GitHub CLI updates would diverge from GitHub CLI
extension updates over time.  To that end, this commit splits that logic into a separate function with a new environment variable.
2025-01-10 14:16:46 -05:00
Andy Feller
4f32282f93 Update gh auth commands to point to GitHub Docs
After initial discussion with core maintainers, it didn't seem prudent to duplicate the GitHub Docs information on OAuth scopes within the GitHub CLI codebase.

Instead, this commit updates help usage information in relevant commands on the page within GitHub Docs for more information.
2024-12-12 11:03:57 -05:00
ANKDDEV
419a01271a
docs: add help topic for auth scopes 2024-12-06 17:03:31 +03:00
William Martin
d4c70009bf
Adjust environment help for host and tokens (#9809) 2024-10-24 17:54:27 +02:00
Scott Mcdermott
4aff4ebe12 Allow user to override markdown wrap width via $GH_MDWIDTH from environment 2024-10-04 17:43:06 -07:00
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
Found with
    rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'

Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
2024-08-03 00:35:30 +08:00
William Martin
c16becc07e Slightly clarify when CLI will exit with 4 2024-07-23 16:44:49 +02:00
ihmpavel
72b6dc5d8c
chore: Unify calling gh in examples (#8560) 2024-01-11 09:07:23 -08:00
Andy Feller
b77de0d458 Additional formatting changes
- gh help actions
  - highlight 3 commands to run for more information
- gh extension
  - wrapping url for online linking
  - fix install subcommand missing backtick formatting
- gh release create
  - fixing mixed indenting causing usage misalignment
- root help
  - backtick wrap help command for more info for consistency
- gh help environment
  - backtick wrap missed OWNER/REPO
- gh variable
  - brought consistency to output when deleting or setting variable
2023-12-01 09:08:51 -05:00
Yukai Chou
e31919c8fc Update link to jq docs 2023-11-23 07:20:41 +08:00
Yukai Chou
ba585149c3 Leftovers 2023-11-23 07:12:47 +08:00
Yukai Chou
07a87ca8a4 Wrap special values and placeholders like - and $1 2023-11-23 07:09:29 +08:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
5c4cb50231 Wrap env variables in backticks uniformly 2023-11-17 01:32:00 +08:00
Yukai Chou
896101678f Wrap cli commands in backticks uniformly 2023-11-17 01:32:00 +08:00
Tony F
ae3e879480
Mention setting GH_ENTERPRISE_TOKEN
When GH_HOST is set
2023-05-15 10:49:45 -05:00
William Martin
07ed1e4e8a
Introduce helpTopics type and reduce duplication across commands (#7414) 2023-05-11 14:59:12 +02:00
Martijn Pieters
530002ee7a
Pretty-print JSON results of jq filtering (#7236)
When connected to a TTY, tell the jq formatter to indent the output, and
enable colorization of the output if the terminal supports it.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-25 13:27:17 +00:00
աɨռɢӄաօռɢ
5a2c24d363
docs: revise GH_CONFIG_DIR content in help_topic.go (#7230) 2023-03-27 01:18:09 +00:00
Sam Coe
05bf29d88e
Introduce GH_PATH environment variable (#7025) 2023-03-07 11:30:10 +11:00
Mislav Marohnić
dbc244a993
Document the hyperlink helper 2022-10-31 15:04:53 +01:00
Ariel Deitcher
7a55496b87 code review feedback 2022-10-03 19:07:32 +03:00
Ariel Deitcher
6785e9fa67 update formatting help command 2022-10-03 03:23:14 -07:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Ariel Deitcher
43325fb3e1
Disable interactive prompting with GH_PROMPT_DISABLED (#6082) 2022-08-17 09:11:54 +03:00
Matthew Runo
621cd4153e Fixes #6024.
Adding documentation for exit codes used by 'gh'
2022-08-15 15:25:39 -07:00
Matthew Runo
9b16d1ecdd Fixes #6024.
Adding documentation for exit codes used by 'gh'
2022-08-15 15:20:19 -07:00
Mislav Marohnić
2139e763fb Write Cobra deprecation messages to stderr
We used to do the equivalent of `rootCmd.SetOut(os.Stdout)` because we
thought that Cobra's "Out" stream represents standard output. However,
upon closer inspection it turns out that this is Cobra's stream for
usage errors and deprecation warnings, and those we want written to
stderr as well. It is not clear to me why Cobra maintains a distinction
between "Out" and "Err" streams since both seem to go to sdterr by
default.

This change also ceases our usage of `command.Print()` functions in
favor of explicitly writing to `IOStreams.Out/ErrOut`.
2022-05-23 20:23:42 +02:00
lylecantcode
56fda0f8c6
Support GH_DEBUG to control verbosity, deprecate DEBUG (#5306)
The GH_DEBUG environment variable is a new gh-specific verbosity control.

For backwards-compatibility, DEBUG will still be respected if it has values
"1", "true", "yes", and "api", but any other values will be ignored.

Finally, support for "oauth" debug value has been dropped in favor of "api".
The "oauth" value only had limited, internal use.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-03-29 18:05:35 +02:00
Kevin Lee
0d143ca89c
Consistent punctuation in command usages (#5139)
* Fix spelling and grammatical errors in command docs
* Add periods for consistency across the long command descriptions
* Format imports
2022-01-31 10:56:12 +00:00
Mislav Marohnić
9b7d53501f Make sure URLs in man pages render as hyperlinks on the web 2021-11-03 15:39:10 +01:00
Peter Benjamin
175da0f58a
Fix rendering issue in "formatting" help topic (#4661)
Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
2021-11-02 17:30:49 +00:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables (#3519)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Mislav Marohnić
af2aecd40b
Merge pull request #4146 from cli/force-tty
Add ability to force terminal-style output even when redirected
2021-08-23 16:46:14 +02:00
Sam
8fb6bb66c8
Merge pull request #3992 from despreston/858-config-browser
add browser option to config
2021-08-17 14:17:54 -07:00