Commit graph

139 commits

Author SHA1 Message Date
Josh Kraft
74bf49fcf5
Merge branch 'trunk' into gh-org-command 2023-03-31 15:58:34 -06:00
Josh Kraft
37970f4863 feat: add gh org list 2023-03-31 15:53:55 -06:00
աɨռɢӄաօռɢ
5a2c24d363
docs: revise GH_CONFIG_DIR content in help_topic.go (#7230) 2023-03-27 01:18:09 +00:00
Anupam Kumar
88cc4d2531
Add variable set command (#6928) 2023-03-13 03:01:38 +00:00
Sam Coe
05bf29d88e
Introduce GH_PATH environment variable (#7025) 2023-03-07 11:30:10 +11:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00
Robin Neatherway
78fb90956c
Teach gh cs create to use current repo as default (#6596)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-02-07 20:05:38 +00:00
Mislav Marohnić
b3aeaf6c2e
Remove the feedback section from gh help 2022-11-09 16:43:18 +01:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01: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
Mark Woods
e876b22963
Change markdown wrap limit match terminal width (#6016) 2022-09-01 07:36:25 +00: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ć
d21d388b8d
Restore old GH_DEBUG=1 behavior for HTTP logging (#6054)
- No HTTP bodies or headers are logged until `GH_DEBUG=api` is used.
- Logging to terminal now supports colorization.
2022-08-10 17:59:13 +02:00
Sam Coe
074ed50b8a
Integrate go-gh API package (#5614) 2022-06-23 04:05:31 +01:00
Mislav Marohnić
7859afb586 Fix Cobra completion output going to stdout 2022-05-25 14:57:47 +02:00
Mislav Marohnić
cfaca91d06 Fix --version flag printing to stdout 2022-05-24 16:21:13 +02: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
Sam Coe
2c0236d096
Add extension upgrade --dry-run (#5098) 2022-04-12 07:18:08 +00:00
xiaotong
4a5864708c
Add label list and label create commands (#5316) 2022-03-29 17:38:59 +00:00
Nate Smith
e2fd7ceff0
Merge pull request #5369 from cli/gh-status 2022-03-29 11:32:28 -05: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
nate smith
f22c325ea4 gh status 2022-03-28 11:53:13 -05:00
Sam Coe
e0045f26b9
Add top level search command and search repos sub command (#5172) 2022-03-09 12:24:27 +00:00
Nate Smith
91c4a5d828
Merge pull request #5234 from markphelps/codespaces-accept-perms
Codespaces Create: Allow Accepting Permissions
2022-02-28 16:54:45 -06:00
Mislav Marohnić
7235384f12 gh: list help topics in help output 2022-02-18 18:39:30 +01:00
Mark Phelps
590acaa1d6 WIP 2022-02-15 19:35:53 -05: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ć
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +01:00
Mislav Marohnić
3b7e5fc246 Store Executable() information on codespaces App
This is to avoid having to explicitly pass it to each subcommand that
needs it. Each codespaces command runs in the context of App, so that's
a point of shared context that we can store state in.
2021-12-21 14:03:10 +01:00
Jason Lunz
f22be4a03d
use a more robust method to get the executable path
cmdutil.Factory.Executable() accounts for things like package managers
and symlinks to the actual executable.

An alternative to passing the *cmdutil.Factory down the stack would be
stashing the executable string in the codespace.App, which works (and
the diff is smaller), but it produced some odd non-local test failures.
This way seems less mysterious and more like other uses of Factory in
the codebase.
2021-12-20 13:57:52 -07:00
Marwan Sulaiman
a3940020f9
Inherit API endpoint configuration from the Codespaces environment (#4723)
gh codespace commands now respect the following environment variables:

- GITHUB_SERVER_URL: typically "https://github.com"
- GITHUB_API_URL: typically "https://api.github.com"
- INTERNAL_VSCS_TARGET_URL: typically "https://online.visualstudio.com"
- GITHUB_TOKEN when CODESPACES is set, even if the host connecting to isn't "github.com".

This set of changes ensures that `gh codespace` commands automatically connect to the right API endpoints when gh is used within a codespace.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-22 12:40:01 +01: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
Mislav Marohnić
a843cbd728 Mark codespace a core command 2021-10-25 19:42:22 +02:00
Mislav Marohnić
31ba2ea4d5
Publish codespace commands (#4606) 2021-10-25 17:38:00 +00:00
Alan Donovan
2f7f224c9e
Merge pull request #4584 from cli/FlagErrorf
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 14:14:05 -04:00
Jose Garcia
bbea5ac95e
codespace: progress indication, logging (#4555)
* Rework logging, showing progress, and printing from `codespace` commands
* Change rendering of the general progress indicator so that it's visible on both dark and light backgrounds
* The progress indicator now "spins" faster

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-10-21 18:04:04 +02:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Sam
a02d423687
Merge pull request #3822 from owenvoke/feature/gpg-key
feat: add GPG key management commands
2021-10-18 11:36:44 -07:00
Mislav Marohnić
a723813064 Don't allow the lazyLoadedHTTPClient mutex to wrap Do()
We only need a mutex around accessing `l.httpClient`, but never around
the actual HTTP request.
2021-10-01 11:18:15 +02:00
Jose Garcia
0859de0124 Merge branch 'trunk' of github.com:cli/cli into jg/move-ghcs-cmd 2021-09-30 12:38:41 -04:00
Jose Garcia
9e6c11e767 Move cmd/ghcs to pkg/cmd/codespace
- Delete pkg/cmd/codespace/main as it is no longer needed in this
  codebase
2021-09-30 11:20:13 -04:00
Jose Garcia
b5bbb442fd Move internal/api to internal/codespaces/api 2021-09-30 11:06:43 -04:00
Jose Garcia
c3ce95ea1c Add mutex to guard httpClient 2021-09-29 16:45:51 -04:00
Mislav Marohnić
0d0152b0fa Have gh codespace inherit the correct API client 2021-09-29 21:21:16 +02:00