Commit graph

745 commits

Author SHA1 Message Date
Kynan Ware
4cf048a8d1 fix(prompter): input returns default when blank 2025-04-04 11:33:10 -06:00
Kynan Ware
5b0d49c6ec test(prompter): more tests for bad input 2025-04-04 11:06:40 -06:00
Kynan Ware
a30df14b6a refactor(prompter): rename env var for speech synthesizer friendly prompter 2025-04-03 13:08:16 -06:00
Kynan Ware
49ddacf5b8 docs(prompter): doc prompter interface 2025-04-03 13:06:31 -06:00
Kynan Ware
02fc12e7b7 fix(linter): linter errors 2025-04-03 08:51:54 -06:00
Kynan Ware
88e6285b49 test(prompter): move to external package 2025-04-03 08:45:58 -06:00
Kynan Ware
8827803bd1 test(prompter): skip vt10x tests on Windows 2025-04-03 08:25:33 -06:00
Kynan Ware
e299b56c0f test(prompter): remove needless variable declaration 2025-04-02 13:08:36 -06:00
Kynan Ware
e42af35839 tests(prompter): rename huhprompter 2025-04-02 13:00:46 -06:00
Kynan Ware
0d7fd36f11 test(prompter): replace assert with require 2025-04-02 12:58:44 -06:00
Kynan Ware
94bbd26aab fix(prompter): rename huhprompter 2025-04-02 12:56:44 -06:00
Kynan Ware
f7de9e0c11 test(prompter): go-expect based prompter tests 2025-04-02 12:56:44 -06:00
Kynan Ware
88a98ea63a
feat(prompter): include no as false-y value
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-04-02 11:58:10 -06:00
Kynan Ware
92b1a8e0f0 test(prompter): remove t.parallel calls
t.Parallel() cannot be used when env vars are being set.
2025-03-31 16:01:16 -06:00
Kynan Ware
e973ee332d fix(md prompter): accessible prompt allows blank
Allow the accessible markdownEditor prompt to be blank when the blank
comes from the result of an interactive session with an editor, even when
blankAllowed is false.

This behavior aligns the accessible prompter with the behavior of the
current standard prompter.
2025-03-31 15:58:20 -06:00
Kynan Ware
7b0c09541d feat(md prompter): md prompt respects blankAllowed
Accessible prompter now respects blankAllowed and
will not prompt for "skip" if blankAllowed is false.
2025-03-31 15:52:26 -06:00
Kynan Ware
202c1ad16b feat(prompter): add accessible prompter support 2025-03-31 15:04:57 -06:00
Andy Feller
6355e54e3c Ensure table headers are thematically contrasting
This commit refactors the color format around table headers to ensure the GitHub CLI uses thematically appropriate colors based on dark background, light background, or no color at all.

In order to do so, `ColorScheme` needs information from the terminal about the background appearance (dark, light, none) to determine appropriate muted color.
2025-03-21 11:51:03 -04:00
Azeem Sajid
a4b86bff77 Use HTML numeric code instead of escaping with slash 2025-02-04 18:48:56 +05:00
Azeem Sajid
800a645e0e [gh config] Escape pipe symbol in Long desc for website manual 2025-02-04 18:16:13 +05:00
William Martin
53f80b2ebf
Merge pull request #10265 from robmorgan/patch-1
Tiny typo fix
2025-01-21 13:48:50 +01:00
Caleb Brose
0c8591064d Change back to exponential backoff 2025-01-17 14:09:33 -06:00
Caleb Brose
9b8cd7babd Linter 2025-01-17 14:09:33 -06:00
Caleb Brose
31bff5b5a8 Better handling for codespace state polling 2025-01-17 14:09:33 -06:00
Rob Morgan
dcf5cc8724
fix: tiny typo fix 2025-01-17 18:08:59 +08: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
1c32c986ec Capture greater detail on updaterEnabled
This commit expands the in-line docs around updaterEnabled package variable used to affect release checking.

Along with clarifying specific details discovered when talking with @williammartin, I'm also removing a useless local variable.
2025-01-10 13:55:16 -05:00
Andy Feller
6bbd70353b Comment exported functions 2025-01-09 09:09:42 -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
10f62b1c37 Expand update tests for local extensions 2024-12-08 21:06:01 -05:00
Andy Feller
a79e086bd4 Test whether extension update should be checked 2024-12-08 20:43:51 -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
William Martin
9bd8f09774 Use safepaths for run download 2024-12-04 22:12:58 +01: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
William Martin
75712de712 Allow client pull to use insecure credential pattern 2024-11-26 22:29:51 +01:00
William Martin
46922694dc Support secure credential pattern 2024-11-26 22:29:38 +01: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
Sarah Barili
a02f84528a
Update internal/codespaces/rpc/invoker.go
Co-authored-by: Caleb Brose <5447118+cmbrose@users.noreply.github.com>
2024-11-08 09:11:44 -07:00
Sarah Barili
6d5a26cfd1 adding username validation to the invoker ssh server 2024-11-06 14:45:41 -07:00
Tyler McGoffin
0bd4e034ef Remove unnecessary code branches 2024-10-15 12:35:35 -07:00
Tyler McGoffin
e1a39d8e2b Add ghe.com to tests describing ghec data residency 2024-10-15 12:24:41 -07:00
Tyler McGoffin
81591a09b8 Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
Tyler McGoffin
3a8417f6c7 Add test coverage to places where IsEnterprise incorrectly covers Tenancy
IsEnterprise currently returns `true` when `IsTenancy` returns true. We
prefer that this behavior is orthogonal. This commit adds failing tests to
the instances where IsEnterprise should not behave the same as IsTenancy.

These test cases are expected to pass with the inclusion of the coming
improvements to go-gh to handle the orthogonality of IsEnterprise and
IsTenancy.
2024-10-15 11:56:43 -07:00
William Martin
d7465bdf3c Initial testscript introduction 2024-10-11 16:31:16 +02:00
bagtoad
ca01bb8f9c Handle errors from parsing hostname in auth flow 2024-10-08 16:12:40 -06:00
Ulf Adams
e6d39eb886 Print the login URL even when opening a browser
Fixes https://github.com/cli/cli/issues/5500.
2024-10-03 17:18:52 +02:00
Tyler McGoffin
13e916bcfb Change prompts for gh auth login to reflect change from GHE to Other 2024-09-20 14:10:05 -07:00