Commit graph

725 commits

Author SHA1 Message Date
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
bagtoad
d24dfbeacf Update comment formatting 2024-09-18 10:35:35 -06:00
bagtoad
88d48f2365 Add HasActiveToken method to AuthConfig interface 2024-09-18 10:32:58 -06:00
bagtoad
e7403b89d0 Add HasActiveToken to AuthConfig.
Co-authored-by: William Martin <williammartin@users.noreply.github.com>
2024-09-18 08:42:19 -06:00
William Martin
352737cb60 Use api subdomains for commands using ghinstance package 2024-09-13 15:03:36 +02:00
Yukai Chou
687a43fe89 Drop surplus trailing space char in flag names in web
Introduced by 92cb2cc7 (more closely match cobra default val display,
2023-12-05).
2024-08-23 02:15:07 +08:00
Andy Feller
779a1203b6
Merge pull request #9471 from heaths/issue9470
Always print URL scheme to stdout
2024-08-21 14:46:52 -04: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
Heath Stewart
6b9a0aa89f
Check http scheme as well
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-08-16 10:11:53 -07:00
Heath Stewart
009838a8db
Always print URL scheme to stdout
Fixes #9470
2024-08-16 10:11:46 -07:00
Zach Steindler
658f125ab3
Update sigstore-go in gh CLI to v0.5.1 (#9366)
Signed-off-by: Zach Steindler <steiza@github.com>
2024-07-25 20:59:39 +02:00
notomo
30b3286533 Add prefer_editor_prompt config 2024-07-09 21:01:50 +09:00
gabemontero
39e4cbd973 update generated content for man pages and website 2024-05-17 09:30:53 -04:00
William Martin
85e81a50da Comment further on config changes 2024-05-10 10:55:41 +02:00
William Martin
bc5329e9db Fix mistaken find and replace for Option type 2024-05-10 10:48:45 +02:00
William Martin
07e0ff7127 Fix repo fork to use remote protocol if none configured 2024-05-10 10:48:36 +02:00
William Martin
d0e436b369 Avoid reconstructing config Options on each use 2024-05-10 10:48:24 +02:00
William Martin
8a4f32b4e2 Make config list less fallible 2024-05-10 10:48:17 +02:00
William Martin
8a82e3a856 Provide more type safety around config values 2024-05-10 10:48:11 +02:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Viktor Szépe
6d9dd57774 Fix typos 2024-05-09 20:15:27 +00:00