Commit graph

438 commits

Author SHA1 Message Date
Andy Feller
c7c74dd422
Merge pull request #8342 from muzimuzhi/docs/unify-markup
Unify doc mark-ups
2023-12-01 09:31:36 -05:00
Mateus Marquezini
7a32b8b5f3 some code improvements after code review 2023-11-27 17:17:24 -03:00
Yukai Chou
ba585149c3 Leftovers 2023-11-23 07:12:47 +08:00
Yukai Chou
07a87ca8a4 Wrap special values and placeholders like - and $1 2023-11-23 07:09:29 +08:00
Mateus Marquezini
7af33d090a added a new error handling when the display name flag exceeds 48 characters #8356 2023-11-20 18:45:12 -03:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
5612d2864e Add leftovers 2023-11-17 01:32:29 +08:00
Yukai Chou
8eec3e8040 Wrap path to file in backticks 2023-11-17 01:32:29 +08:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
David Gardiner
581b6652e2 Resolve race condition in codespaces connection 2023-10-31 12:19:14 -07:00
David Gardiner
500f359592
Don't poll for addition codespace permissions if user chooses to create without them (#8267) 2023-10-30 13:22:38 -05:00
Sam Coe
5023b61909
Remove uses of FuzzyAgoAbbr in tables (#8222) 2023-10-22 17:33:49 +02:00
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
David Gardiner
135c56aead Fix linting error 2023-10-16 10:09:04 -07:00
David Gardiner
a8f8728056 Poll permission acceptance endpoint on codespace creation 2023-10-12 16:55:13 -07:00
David Gardiner
64f4660ec7
Migrate all Codespaces operations from Live Share to Dev Tunnels (#8149)
* Migrate all Codespaces operations from Live Share to Dev Tunnels

* Remove Live Share references

* Fix linting errors

* Update comments, remove deps, add uint16 bound checks

* Fix tests and move keep-alive logic to forwarder

* Address comments

* Updated mock port forwarder

* Fix CodeQL error

* Update comment

* Update func name

* Add missing connection close

* Fix linting error

* https -> http

* Update defer

* Fix tests
2023-10-12 22:16:36 +00:00
David Gardiner
e059f32aa5 Forward codespace ports over Dev Tunnels 2023-09-27 13:42:40 -07:00
Josh Gross
c5f88bb551
Show full permissions URL in gh cs create (#7983)
* Show full permissions URL in `gh cs create`

* Validate that full permissions URL is displayed
2023-09-12 10:12:53 -07:00
John Keech
93e1511bae
Codespaces: Use the host name from the logged in server for commands (#7795)
* Use the host name from the logged in server for codespace commands

* Fix existing tests

* Add tests for server url configuration

* Rename defaultApiUrl to defaultAPIURL and comment cleanup

* Switch to t.Setenv in codespaces api tests

* Switch to t.Setenv in other tests

* Support custom server in web flows for list and create

* Rename GetServerURL() to ServerURL()
2023-08-08 09:32:06 -07:00
Jose Garcia
37d8e9e915 Support --server-port behavior with conn details 2023-07-02 20:55:56 -04:00
David Gardiner
acf7dadaeb Codespaces view command updates 2023-06-07 11:04:17 -07:00
David Gardiner
290b802bf7 Remove unused type 2023-05-30 14:22:12 -07:00
David Gardiner
15e1fa510d Add test 2023-05-30 14:19:15 -07:00
David Gardiner
82650b364b Fix linting error 2023-05-30 12:53:46 -07:00
David Gardiner
5b83d55186 Don't display retention period if 0 days 2023-05-30 12:45:53 -07:00
David Gardiner
3c05c99c83 Address comments 2023-05-30 12:20:23 -07:00
David Gardiner
f6a5398bf9 Update fields to show 2023-05-26 22:59:28 +00:00
David Gardiner
99cd0af8b4 Check if running in a codespace 2023-05-26 15:41:34 -07:00
David Gardiner
54560c19dd Add gh cs view command 2023-05-26 09:54:58 -07:00
Kousik Mitra
8d0f211fdb
Print message after codespace deletion (#7353) 2023-05-09 20:56:54 -05:00
Kousik Mitra
d0207a2ede
Add capability to filter codespaces by repo owner (#7347)
* Add capability to filter codespaces by repo owner

* Replace Flags with PersistentFlags

* Reword flag description

* Update test seed

* Add mutual exclusion

---------

Co-authored-by: Caleb Brose <5447118+cmbrose@users.noreply.github.com>
2023-04-27 10:42:08 -05:00
Alexander Seiler
218f29f296
Correct some typos 2023-04-21 03:51:31 +02:00
Caleb Brose
09e86d0ebf
Fix gh cs ports requiring sudo for privileged port numbers (#7326) 2023-04-19 07:00:44 -05:00
John Keech
4b5a9032fe
Clarify how SSH keys are selected (#7325)
Fixes: https://github.com/orgs/community/discussions/52556

Update the help text for `gh codespace ssh` to provide more details about how SSH keys are selected.
2023-04-17 10:19:03 -07:00
Navaneethan
c0855a3e61
Fix typo in cs stop command: Stoppping -> Stopping (#7318) 2023-04-14 14:08:42 -05:00
doaortu
83322104b7
feat: add web flag for codespace list & create subcommand (#7288)
* feat: add web flag to cs list subcommand

web flag only works with repo flag, because,
currently there only param for listing with repo_id

* feat: add web flag to cs crate subcommand

web flag used for creating codespace through web UI instead of terminal.
web flag cannot be used with display-name, idle-timeout,
or retention retention-period
because there's no option for that in the Web UI

* refactor: extract mutual excusive logic to PreRunE

- changed web flag mutual exclusive logic, using cmdutil
- extract that logic to PreRunE clause in createCmd
- move web flag up to make it close to PreRunE clause (for clarity)
- add new param to newCreateCmd fn to facilitate test logic
- apply new newCreateCmd fn to root.go

* fix: clarify flag desc and error message

- remove 'yet' from error messages that can cause misunderstanding
- clarify list web flag can only be used with repo flag

* fix: skip machine check when we use web flag ...
(..and no machine flag provided)

+ add test for this new case
+ adjust related test cases for this new change.

* refactor: move flag check logic to PreRunE

why: err on PreRunE or RunE will also print help if error happened

+ move web, repo, org, user mutual exclusive logic to PreRunE clause
+ move repo, org, user mutual exclusive logic to PreRunE
+ move limit check flag to PreRunE
+ modify newListCmd fn to facilitate test logic
+ apply new newListCmd to root.go
+ add test cases to check PreRunE clause
- remove mutual exclusive test cases from Test_AppList

* refactor: remove the opts equality checks

* fix: mutually exclusive misfires
because of wrong logic

+ refine test case too

* cleanup:removing useWeb check in fn getMachineName

because it's no longer needed

+ remove redundant test-case

* refactor: remove redundant ifs

* refactor: clarify test name

* re-clarify web flag desc in list.go

* refactor: break long lines, use more idiomatic err

* add test case for nonexistent/wrong machine
2023-04-13 10:37:16 -05:00
Caleb Brose
27a3fcc807 Fix invoker immediately closing 2023-04-05 19:33:50 -05:00
Mislav Marohnić
1933fc2f69
codespace ssh: fix "connection reset by peer" 2023-03-09 15:14:39 +01:00
JP Ungaretti
0673dcccb1 Fix delete tests 2023-03-07 19:29:44 +00:00
JP Ungaretti
39a1dc90af Match return style 2023-03-07 19:05:49 +00:00
JP Ungaretti
c347737ace Fix build errors 2023-03-07 18:47:27 +00:00
JP Ungaretti
5a7f779cf7 Merge branch 'trunk' into jungaretti/fix-jupyter-spinner 2023-03-07 18:43:34 +00:00
Caleb Brose
c9992b41a2
Always open new vscode window in gh cs code (#7092)
* Open new vscode window

* Tests
2023-03-06 22:50:43 +00:00
Caleb Brose
57c73e8239
Add --repo filter to more gh codespaces commands (#6669)
* Add --repo flag to commands

* Example of using common args

* Add -r to stop

* Add validation to the add helper

* Skip prompt for single option

* Migrate (mostly) everything to addGetOrChooseCodespaceCommandArgs

* Fix typo in logsCmd

* Use R instead of r

* Update a couple -r usages

* Refactor to codespace_selector

* Clean up selector, apply it in a couple examples

* Use apiClient instead in constructor

* Restore addDeprecatedRepoShorthand

* Finish implementing the commands

* Update existing tests to use the selector

* Add tests for selector

* linter

* Catch case where there's no conflict

* Make the flag persistent for ports

* Add support to stop
2023-02-22 17:16:36 -06:00
JP Ungaretti
6a150d57e0 Adopt in delete.go 2023-02-09 23:21:41 +00:00
JP Ungaretti
a388358348 Merge branch 'trunk' into jungaretti/fix-jupyter-spinner 2023-02-09 23:18:22 +00:00
JP Ungaretti
1b88915a4d Rename f to run 2023-02-09 23:16:12 +00:00
JP Ungaretti
a848cd1bd0 Adopt in stop.go 2023-02-09 23:13:44 +00:00
JP Ungaretti
bc789b2787 Adopt in ssh.go 2023-02-09 22:53:48 +00:00
JP Ungaretti
970088a7af Adopt in ports.go 2023-02-09 22:52:04 +00:00