Commit graph

92 commits

Author SHA1 Message Date
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
Mislav Marohnić
7673622830 Mount gh codespace command 2021-09-28 17:03:05 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables (#3519)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Mislav Marohnić
af2aecd40b
Merge pull request #4146 from cli/force-tty
Add ability to force terminal-style output even when redirected
2021-08-23 16:46:14 +02:00
Sam
8fb6bb66c8
Merge pull request #3992 from despreston/858-config-browser
add browser option to config
2021-08-17 14:17:54 -07:00
Sam Coe
b9438015a2
Add GH_BROWSER to help topic 2021-08-17 14:10:15 -07:00
Mislav Marohnić
321fd98f82 Add ability to force terminal-style output even when redirected 2021-08-17 20:12:25 +02:00
Mislav Marohnić
bf9c49eccd Rename gh extensionsgh extension
This is for compatibility with other core commands which are all singular.
2021-08-11 22:22:39 +02:00
Mislav Marohnić
0d999ddaa1 Rework local extensions for Windows
Replace the implementation that relied on symlinks with the one that
create regular files that act like symlinks: they contain a reference to
the local directory where to find the extension.
2021-07-28 22:47:54 +02:00
Mislav Marohnić
fdad37e248
Merge pull request #4019 from cli/enterprise-env
Fix error message when using GH_ENTERPRISE_TOKEN but host is ambiguous
2021-07-27 15:29:14 +02:00
Mislav Marohnić
9033258f5f Clean up GH_CONFIG_DIR docs
This removes the false equivalence between GH_CONFIG_DIR and
XDG_CONFIG_HOME. These settings do not have the same effect and should
not be used for the same purposes.

Also remove the documentation about what `XDG_*` settings do. We simply
conform to the XDG Base Directory Specification, but will not document
it. It's likely that users of these environment variables already know
what they do.
2021-07-20 14:24:11 +02:00
Mislav Marohnić
aec0f10041 Fix error message when using GH_ENTERPRISE_TOKEN but host is ambiguous
Before:

    $ GH_ENTERPRISE_TOKEN="..." gh pr create
    could not find hosts config: not found

Now:

    $ GH_ENTERPRISE_TOKEN="..." gh pr create
    set the GH_HOST environment variable to specify which GitHub host to use

Also amends `gh help environment` documentation to suggest the use of
GH_HOST when scripting operations with GitHub Enterprise repositories.
2021-07-20 14:11:07 +02:00
Nate Smith
554250bc4e
Merge pull request #3779 from jgold-stripe/unix
Add ability to dial API via unix socket
2021-06-29 09:46:33 -07:00
Nate Smith
0474ba686d
Merge pull request #3773 from bchadwic/first-browse-pull
Feature/Create browse command
2021-06-29 09:17:30 -07:00
jonathan gold
fc3dec4a58 Change signature of NewHTTPClient to accomodate errors 2021-06-25 11:26:21 -07:00
Mislav Marohnić
1ec47d8191 Improvements to gh extensions
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
2021-06-21 16:54:08 +02:00
jlsestak
203d41c37b
Merge branch 'cli:trunk' into first-browse-pull 2021-06-16 20:37:34 -07:00
Sam Coe
53fac59ef9
Cleanup factory/default and add tests 2021-06-15 09:19:16 -04:00
Mislav Marohnić
7999a457ad Separate out NewCmdBrowse tests from runBrowse tests
Co-authored-by: Benjamin Chadwick <benchadwick87@gmail.com>
Co-authored-by: Jessica Sestak <jlsestak@gmail.com>
2021-06-11 18:53:34 +02:00
bchadwic
88ec5ad3b2 Fixing issues in the pr 2021-06-10 21:14:10 -07:00
bchadwic
569d2fd58a Got tests objects to fully work! Currently working on making more test cases 2021-06-07 21:47:08 -07:00
ttran112
1a9704dbfb fix the route 2021-06-05 22:46:46 -07:00
Thanh D Tran
ed87cf71b7 Merge branch 'cli:trunk' into first-browse-pull 2021-06-05 20:43:39 -07:00
Mislav Marohnić
ffebd23ba7
Merge pull request #3761 from cli/command-extensions
Experimental command extensions support
2021-06-03 19:13:38 +02:00
Sam Coe
389fdb7f99
Add XDG env variables to environment help topic 2021-06-02 09:56:22 -04:00
Mislav Marohnić
fce93d6080 Experimental command extensions support
Extensions are looked up as `~/.config/gh/extensions/gh-*`.
Additionally, any executables found in PATH named `gh-*` are available
as `gh <command>`.
2021-06-01 17:15:20 +02:00
Ben
68ce66801b We got the browser to open on gh browse, now we're working towards making it specific to the argument passed in. Mini wingit add .! 2021-05-15 21:09:13 -07:00
Ben
e905133068 working towards removing the help message when browse is inputted 2021-05-15 14:47:50 -07:00
Ben
88ef7ce58b removed view, from here on out exclusively working in browse to do most of the logic 2021-05-15 12:08:51 -07:00
bchadwic
602334f58a working on the browse view 2021-05-12 16:02:14 -07:00
nate smith
9f451d9eef review feedback 2021-04-29 16:06:26 -05:00
nate smith
9110db7f7e fill in help topic 2021-04-29 10:58:40 -05:00
nate smith
02e9fa086d start on incorrect function error handling 2021-04-28 13:59:54 -05:00
vilmibm
9ebcca7082 include magic repo resolution magic for workflow and run 2021-04-19 16:23:49 -05:00
Mislav Marohnić
e327b42f79 Add gh help formatting topic & link to it from commands with JSON output 2021-04-14 18:27:15 +02:00
Nate Smith
9fe7326d46
Merge pull request #3338 from cli/merge-job-run-view
absorb job view into run view
2021-04-02 11:00:48 -05:00
Sam Coe
8b1ed28121
Add section in help for actions commands 2021-04-01 21:05:50 -07:00
vilmibm
cc8d55c518 remove job command, update gh actions text 2021-03-31 16:17:30 -05:00
Nate Smith
2ab073d599
Refactor use of glamour to allow style overrides (#3243)
* Refactor use of glamour to allow style overrides

* leave the things the way they were and just expose the ability to set overrides
2021-03-19 16:29:32 +00:00
Nate Smith
8480381d13
workflow list (#3245)
* add gh workflow list

* review feedback
2021-03-16 16:12:27 -05:00
Nate Smith
126b498e9f
Actions Support Phase 1 (#2923)
* Implement first round of support for GitHub Actions

This commit adds:

gh actions
gh run list
gh run view
gh job view

as part of our first round of actions support. These commands are
unlisted and considered in beta.

* review feedback

* tests for exit status on job view

* spinner tracks io itself

* review feedback

* fix PR matching

* enable pager for job log viewing

* add more colorf functions

* add AnnotationSymbol

* hide job, run

* do not add method to api.Client

* remove useless cargo coded copypasta
2021-03-16 13:59:34 -07:00
edualb
e26a1b98a1 add ssh-key command 2021-01-20 20:23:38 +01:00
vilmibm
5309a2089a implement gh secret create and gh secret list 2020-12-04 16:47:23 -08:00
Josh Soref
76bd377253 spelling: error 2020-11-21 21:43:51 -05:00