Commit graph

711 commits

Author SHA1 Message Date
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
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
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
Andy Feller
f11f096695
Merge pull request #8934 from babakks/8588-improve-run-list-doc
Improve `run list` doc with available `--json` fields
2024-05-08 17:01:16 -04:00
William Martin
5007c18f5f Fix unused params across project 2024-05-07 17:50:43 +02:00
Babak K. Shandiz
4ac966f030
Fix test function name
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 18:35:54 +01:00
Babak K. Shandiz
05a87b9664
Add test to verify JSON fields section is rendered in Markdown
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 18:01:12 +01:00
Babak K. Shandiz
ad71f8cf9f
Output JSON Fields section in Markdown
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 18:00:54 +01:00
Babak K. Shandiz
5b99a4a2ec
Add test to verify JSON fields section is rendered
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:57:50 +01:00
Babak K. Shandiz
b445adae20
Add jsonCmd test command variable
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:57:12 +01:00
Babak K. Shandiz
2b304a5e84
Output JSON Fields section
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:56:37 +01:00
Babak K. Shandiz
1e88ec55fc
Add FormatSlice function
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:54:21 +01:00
William Martin
cb357785dd Do not mutate headers when initialising tableprinter 2024-05-01 12:35:24 +02:00
William Martin
f808dcee62 Expose CacheDir on Config 2024-04-05 14:58:12 +02:00
cuinix
6091e7ad5b remove repetitive word
Signed-off-by: cuinix <915115094@qq.com>
2024-03-06 23:30:00 +08:00
Bartek Pacia
32eeb63a85
redirect users to the gh environment command 2024-02-27 10:41:03 +01:00
Bartek Pacia
5d72e17246
Revert "make comments in the default config file more informative"
This reverts commit ef96b447d7.
2024-02-27 10:33:15 +01:00