Commit graph

224 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
Kynan Ware
ca46b56456
Merge pull request #11003 from cli/kw-bks/enclose-config-options-in-code-blocks
Fix formatting in allowed values for `gh config --help`
2025-05-22 10:14:14 -06:00
Babak K. Shandiz
960aadf2b9
test: improve test case naming
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-05-22 17:04:04 +01:00
Babak K. Shandiz
53d589223b
test: ensure proper usage of pipes in docs
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-05-21 12:17:05 +01:00
Kynan Ware
4bc056fe20
Merge branch 'trunk' into kw/preview-prompter-command 2025-05-10 11:30:15 -06:00
Andy Feller
c20a4a2ae9
Merge pull request #10890 from cli/andyfeller/gh-accessibility-help-topic
Introduce `gh accessibility` help topic highlighting GitHub CLI accessibility experiences
2025-04-30 15:40:27 -04:00
Andy Feller
d7e2468286 Update a11y text based on draft feedback 2025-04-28 15:01:15 -04:00
Andy Feller
274a09bbc9 Initial gh accessibility command draft
This commit captures the initial command along with functionality and description.

There is an internal discussion about the appropriate place for some of this content.
2025-04-23 10:11:51 -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
abd573ac66 feat(preview): add preview prompter command 2025-04-08 15:14:28 -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
William Martin
cc4bf0fc9f Add small wait to extension update tests 2025-01-16 14:10:42 +01:00
Andy Feller
243acaf579 Refactor test based on PR feedback 2025-01-16 00:08:45 -05:00
Andy Feller
bc8c46b0b1 Make extension update check non-blocking
Fixes #10235

This commit updates the Cobra command logic around extension upgrade checks to be non-blocking.

Previously, we were waiting for 1 second after the extension completed to allow the update checking logic complete, however users want the GitHub CLI to run as far as possible.
2025-01-13 20:38:03 -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
bfc63a14cc Implement remaining PR feedback
After merging in upstream changes regarding local extensions, this commit addresses remaining PR feedback while also bringing the newly merged tests into alignment with other changes.
2024-12-13 23:09:18 -05:00
Andy Feller
5ad6ccf73a Merge branch 'trunk' into andyfeller/cli-cli-8183-timeout-pt2 2024-12-13 22:53:13 -05:00
Andy Feller
c12e3694e8 Implement partial feedback before trunk update 2024-12-13 22:52:03 -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
Andrew Feller
a55f50b115 Remove Extension.FullName() from interface
- this was something I did in the original implementation of this improved extension update notification logic
- discovering other parts of the extension manager code that were working with non-prefixed extension names motivated a different approach
- the extension manager code that requires the extension be prefixed has been enhanced to use the centralized ensurePrefixed() logic, making the need for this on the extension unnecessary
2024-12-08 20:01:26 -05:00
Andrew Feller
97630fe73c Enhance extension manager and tests
- extension manager has been made responsible for extension update directory information
- extension manager has been enhanced to ensure that previously left extension update metadata is deleted before installing an extension
- extension manager has been enhanced to ensure that extension update metadata is deleted when extension is being removed
- refactored extension command tests for manager change, ensuring previous and expected states along with returned release info
- refactored extension manager tests for ensuring previous extension update entries are removed before installing extension
- created extension manager test for installing local extension
- centralized logic for checking and ensuring extension name is "gh-" prefixed
2024-12-08 19:40:24 -05:00
ANKDDEV
419a01271a
docs: add help topic for auth scopes 2024-12-06 17:03:31 +03:00
Andrew Feller
6bd01d52dd Initial extension update check testing
First pass at implementing basic test around extension state checking behavior, wanting to discus with team about level of testing to perform and whether this is really the right place.
2024-12-01 18:20:55 -05:00
Andy Feller
7b91b17395 Refactor extension command testing
This commit allows for stubbing/mocking the function used for checking update release info.  Additionally, this does a minor refactor moving from non-blocking to blocking channel.
2024-11-17 21:59:06 -05:00
Andy Feller
0d3f7cae4e Bring extension update check in line with gh check
This commit is a bit of refactoring to bring the extension update checking logic up to par with what is done with `gh` including creation of state file per extension and listening to env vars for disabling version checking.

This work is not complete as it does not address necessary test changes.
2024-11-17 16:10:58 -05:00
Andy Feller
b8ef951de1 Shorten extension release checking from 3s to 1s
Addressing feedback from extension author demonstration about a noticable pause waiting for extension execution to complete due to amount of time waiting on channel.
2024-11-13 13:04:01 -05:00
Andy Feller
3ec657d087 Enhance extension upgrade tests for URL 2024-11-07 17:35:59 -05:00
Andy Feller
ddf7287ab8 Test extension command update behaviors
This commit expands upon the previous work by creating tests around extension command execution and how various extension update scenarios are handled.

Along the way, the logic handling formatting update messaging has been switched to use `ColorScheme` in order to honor color behavior flags.
2024-11-06 22:49:02 -05:00
Andrew Feller
47d77bd51b Add version checking when executing extensions
Building on logic from the `gh ext list` for retrieving and assessing extension release information, this commit enhances the logic around invoking extensions to check for new releases.

Using the same user experience from checking `gh` version, this should only output information when the extension is used and gives the user information on how to upgrade depending on the type of extension and whether it is pinned or not.

```shell
andrewfeller@Andrews-MacBook-Pro cli % gh ext install dlvhdr/gh-dash --pin v4.6.0
✓ Installed extension dlvhdr/gh-dash
✓ Pinned extension at v4.6.0
andrewfeller@Andrews-MacBook-Pro cli % ./bin/gh dash

A new release of dash is available: 4.6.0 → 4.7.0
To upgrade, run: gh extension upgrade dash --force
https://github.com/dlvhdr/gh-dash
```
2024-11-02 13:14:05 -04: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
Prabhat Kumar Sahu
1886fb46ab
Fix pr checks exit code (#9452)
* Enhance  with exit code documentation

* Add new error message for PR check

* Refine gh pr checks: Add exit code 8

* Update EXIT CODES section format in man page generation
2024-08-16 14:30:11 -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
gabemontero
39e4cbd973 update generated content for man pages and website 2024-05-17 09:30:53 -04:00
gabemontero
77f964aa12 williammartin simplifications 2024-05-17 09:30:53 -04:00
gabemontero
c265753275 remove no-op if clause that returns 'No Aliases' 2024-05-17 09:30:53 -04:00
Andy Feller
7dd35e7470 Conditionalize references, remove redundant alias
This commit adds conditional logic in `gh reference` to only show aliases if
there are aliases to see.  Additionally, this removes the unaliased command
name from being shown under aliases.
2024-05-17 09:30:53 -04:00