Gabriel Ramírez
61b0fe36b2
Adding additional tests for mid-flight deletions and additions
2021-10-05 21:31:47 +00:00
Gabriel Ramírez
02145cc4fd
Updated PR with suggestions
...
- created a new method to avoid defer pileup issue
- removed extra api call at the end of the sequence
2021-10-05 21:15:24 +00:00
Gabriel Ramírez
c6dc50983d
Update internal/codespaces/api/api.go
...
Co-authored-by: Jose Garcia <josebalius@github.com>
2021-10-05 15:33:22 -05:00
Gabriel Ramírez
4314f734e3
Update internal/codespaces/api/api.go
...
Co-authored-by: Jose Garcia <josebalius@github.com>
2021-10-05 15:33:16 -05:00
Gabriel Ramírez
e793a5961d
Add strconv
2021-10-05 19:00:21 +00:00
Gabriel Ramírez
fd5894d28d
Merge remote-tracking branch 'upstream/trunk' into geramirez/codespaces-pagination
2021-10-05 18:58:23 +00:00
Gabriel Ramírez
409cd9c388
Fixing Has() issue due to go version
2021-10-05 18:49:41 +00:00
Gabriel Ramírez
777978644c
Adding pagination to list codespaces
2021-10-05 16:49:40 +00:00
Jose Garcia
616d6c2db1
Merge pull request #4431 from cli/jg/get-skus-public
...
codespace machine: switch `API.GetCodespacesMachines` to use new API
2021-10-05 12:44:38 -04:00
Jose Garcia
3652307cf3
Merge pull request #4429 from cli/jg/start-codespace-public
...
codespace create: update `API.StartCodespace` to use new API endpoint
2021-10-05 09:20:33 -04:00
Jose Garcia
e0db10e4dd
Switch API.GetCodespacesMachines to use new API
...
- The SKU terminology is also dropped in favor of "machine" which
matches the nomenclature of the rest of the product.
2021-10-04 13:40:18 -04:00
Jose Garcia
a3efb53c44
Update API.StartCodespace to use new API endpoint
...
- Switch to using name instead of GUID
- Remove GUID from the code since it is not used anywhere else
- Add docs to the api client methods
- Re-gen mocked client
2021-10-04 08:32:02 -04:00
Jose Garcia
61af29bb96
Update telemetry path
2021-10-01 13:02:29 -04:00
Jose Garcia
6b1876161d
Update DeleteCodespaces to new API endpoint
...
- Drop the need for the user argument
- Update mocks
- Remove no longer applicable TODO comment
- Show message for successful deletion (this regressed)
2021-10-01 12:53:35 -04:00
Jose Garcia
86a4706ed2
Update startCreate to use new API endpoint
...
- Updates the signature of startCreate
- Can't update API.CreateCodespace just yet until we support expanded
access on the GET codespace endpoint which is used for polling
2021-10-01 11:29:16 -04:00
Jose Garcia
05297b8c8d
Update ListCodespaces to use new API endpoint
...
- Removes the need for a User to list codespaces which should result in
a slight speed improvement.
2021-10-01 10:37:15 -04:00
Jose Garcia
94953ed3fc
Merge branch 'trunk' of github.com:cli/cli into jg/move-codespace-api
2021-09-30 11:52:22 -04:00
Jose Garcia
b5bbb442fd
Move internal/api to internal/codespaces/api
2021-09-30 11:06:43 -04:00
Jose Garcia
f4a5f82312
Move internal/liveshare to pkg/liveshare
2021-09-30 10:34:27 -04:00
Jose Garcia
5b5c3da393
Validate host public keys
2021-09-30 08:16:28 -04:00
Mislav Marohnić
f749590e87
Replace old "github/ghcs" import statements
2021-09-28 16:57:56 +02:00
Mislav Marohnić
ca0f89d3bc
Introduce an App struct that executes core business logic
...
The Cobra commands are now a light wrapper around the App struct.
Co-authored-by: Jose Garcia <josebalius@github.com>
2021-09-24 17:20:34 +02:00
Jose Garcia
f4396e8f1a
Inline go-liveshare with history
2021-09-23 11:28:04 -04:00
Jose Garcia
f1c35ba9da
Update docs
2021-09-23 10:21:01 -04:00
Jose Garcia
9654dc4bd3
Update to go-liveshare v0.20.0
2021-09-23 10:07:14 -04:00
Jose Garcia
e8e914c220
PR Feedback
...
- Upgrade to go-liveshare v0.19.0
- Remove export helper method
- Use local implementation
2021-09-21 10:05:48 -04:00
Jose Garcia
a83b3c0816
Update to go-livesare v0.18.0
...
- Only set err if closeErr is non-nil
2021-09-21 08:46:32 -04:00
Jose Garcia
7f682f9c39
Close Live Share sessions
...
- New helper method codespaces.CloseSession to be used using defer
- Upgrade to go-liveshare v0.17.0
2021-09-20 16:56:57 -04:00
Jose Garcia
85f79ed8e8
Merge pull request #159 from github/jg/ssh-cmd-flags
...
ghcs ssh: ssh flags and command support
2021-09-20 07:43:16 -04:00
Jose Garcia
5890d6ad66
Switch if block logic, assert err string
2021-09-17 15:04:55 -04:00
Jose Garcia
da58313358
Remove redudant type def
2021-09-17 14:03:31 -04:00
Jose Garcia
9f84015bd0
Avoid append
2021-09-17 14:00:16 -04:00
Jose Garcia
65e1c6f789
More test cases
2021-09-17 13:56:38 -04:00
Jose Garcia
76037ee753
Update docs, simplify loop to append to command
2021-09-17 13:54:00 -04:00
Jose Garcia
54265afda0
PR Feedback
...
- use named returns
- handle command flags + test case
- simplify tests
2021-09-17 13:43:23 -04:00
Jose Garcia
60d066f0a6
PR Feedback
...
- return nil for slices
- handle `-L -l` case
- document `parseSSHArgs`
2021-09-17 11:51:37 -04:00
Jose Garcia
42e47a98d7
add docs, simplify map, error on invalid args
2021-09-16 15:22:47 -04:00
Jose Garcia
8a0f8b6d1c
parse ssh args and command
2021-09-16 10:32:27 -04:00
Mislav Marohnić
dbb4e0c177
Merge remote-tracking branch 'origin' into ruleguard
2021-09-16 11:46:50 +02:00
Jose Garcia
514448dde8
Merge branch 'main' of github.com:github/ghcs into jg/ssh-cmd-flags
2021-09-15 15:45:53 -04:00
Jose Garcia
10ad85486f
Merge pull request #154 from github/jg/fix-ctx-error
...
ghcs create/ssh: fix ctx cancellation errors & fix todo for X11 forwarding
2021-09-15 15:45:35 -04:00
Jose Garcia
45a9715e9f
Merge pull request #158 from github/jg/go-liveshare-0.16.0
...
upgrade to go-liveshare 0.16.0
2021-09-15 15:40:58 -04:00
Jose Garcia
c5bd8c4127
initial spike to accept args
2021-09-15 15:37:37 -04:00
Jose Garcia
26d3199082
add back codespaces.Shell
2021-09-15 15:18:54 -04:00
Jose Garcia
ecd0c70567
upgrade to go-liveshare 0.16.0
2021-09-15 15:15:28 -04:00
Alan Donovan
06719866c9
move api to internal/
2021-09-15 13:13:10 -04:00
Jose Garcia
547c629220
fix ctx cancellation errors & fix todo for X11 forwarding
2021-09-15 10:38:19 -04:00
Mislav Marohnić
fb5a35568c
Ensure original errors are wrapped with "%w" instead of "%v"
2021-09-15 13:58:41 +02:00
Alan Donovan
cbb8253544
consolidate survey functions
2021-09-09 11:57:37 -04:00
Alan Donovan
2c660fa2e5
avoid ListenTCP helper
2021-09-03 12:55:40 -04:00