Commit graph

6514 commits

Author SHA1 Message Date
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
Mislav Marohnić
9162d47c50
Merge pull request #7305 from kousikmitra/fix/owner-flag-type
Enable owner flag to take multiple values for searching
2023-04-12 12:31:30 +02:00
Kousik Mitra
7ee35e43cc
Enable owner flag to take multiple values for searching 2023-04-12 10:37:09 +05:30
Nate Smith
fe5b142233
Merge pull request #7270 from kousikmitra/feature/ssh-signing-key
Add option to add ssh singing key
2023-04-11 16:09:45 -07:00
Nate Smith
a279dd7082
Merge branch 'trunk' into feature/ssh-signing-key 2023-04-11 16:00:56 -07:00
Nate Smith
32a41da452
Merge pull request #7257 from joshkraft/gh-org-command
feat: add `gh org list`
2023-04-10 15:12:15 -07:00
Josh Kraft
aa8a902004
Merge branch 'trunk' into gh-org-command 2023-04-07 16:59:59 -06:00
Kenichi Kocha
89caedf181
Add -R as shorthand of --repo flag for search commands (#7274) 2023-04-07 17:41:51 +10:00
Nate Smith
4f08b28250
Merge pull request #7284 from cli/cmbrose/invoker-close-fix
Fix codespaces invoker immediately closing
2023-04-06 17:34:41 -07:00
Caleb Brose
27a3fcc807 Fix invoker immediately closing 2023-04-05 19:33:50 -05:00
Josh Kraft
6fd951c189
Merge branch 'trunk' into gh-org-command 2023-04-05 15:39:21 -06:00
Josh Kraft
4d20db0ca0 Merge branch 'gh-org-command' of https://github.com/joshkraft/cli into gh-org-command 2023-04-05 15:38:58 -06:00
Josh Kraft
ba37e2333d add "showing x of y organizations" header 2023-04-05 15:36:45 -06:00
Kousik Mitra
4668810cbe
Enhance ssh-key list to show signing ssh keys also 2023-04-05 19:22:28 +05:30
Kousik Mitra
0d8b5ab9d7
Add option to add ssh singing key 2023-04-05 19:22:28 +05:30
Nate Smith
08f9370345
Merge pull request #7254 from phillippbertram/feat/add-cmd-gh-run-delete
feat: add command `gh run delete`
2023-04-04 17:06:07 -07:00
Nate Smith
633ca03b53
Merge pull request #7278 from cli/auth-refresh-storage
extend secure storage default to auth refresh
2023-04-04 15:35:57 -07:00
nate smith
75dc9c0c22 extend secure storage default to auth refresh 2023-04-04 15:22:42 -07:00
Josh Kraft
8fbcae6a41
Merge branch 'trunk' into gh-org-command 2023-04-04 15:05:23 -06:00
Nate Smith
69573b39b1
Merge pull request #7276 from cli/default-secure-storage
secure storage by default
2023-04-04 11:32:47 -07:00
nate smith
d9db81db4f fix apparent typo 2023-04-04 11:13:53 -07:00
nate smith
5d56dfbf42 add --insecure-storage and make secure storage the default 2023-04-04 11:13:43 -07:00
Kenichi Kocha
1263412055
fix: make number arg, commit arg, and flags mutually exclusive (#7268)
* make number, commit, and flags mutually exclusive

* break condition into arg own check
2023-04-04 12:24:40 +09:30
Kenichi Kocha
6261bc6971
Additional help doc and example for auth setup-git (#7243) 2023-04-04 01:36:09 +00:00
Kenichi Kocha
18f2484080
docs: add commit SHA arg to gh browse help (#7267)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-03 14:40:37 +00:00
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
Nate Smith
de07febc26
Merge pull request #7246 from vaindil/vaindil/check-ssh-key
Check SSH key existence before uploading
2023-03-31 13:58:43 -07:00
vaindil
7006d3f0a5 move SSH key errors out of upload function 2023-03-31 13:47:25 -04:00
vaindil
0e5e7de9af don't parse key bytes twice 2023-03-30 16:36:56 -04:00
Nate Smith
97c4efc20b
Merge pull request #7252 from cli/aws-cloud-shell-install
Improve Amazon Linux install instructions
2023-03-30 11:27:19 -07:00
Phillipp Bertram
32901084bd lint fixes 2023-03-30 18:12:25 +02:00
Phillipp Bertram
7b3a83157d cleanup 2023-03-30 18:06:02 +02:00
Phillipp Bertram
409e1555e6 feat(run): add new delete command 2023-03-30 17:02:04 +02:00
Mislav Marohnić
a4b9d41e79
Improve Amazon Linux install instructions 2023-03-30 11:30:12 +02:00
Nate Smith
991e6806f2
Merge pull request #7249 from alex-petrov-vt/iss-7235
feat: allow filtering workflow runs by status
2023-03-29 17:19:29 -07:00
Nate Smith
6e1693eaf0
Merge pull request #7241 from cli/repo-list-owner-test
repo list: add test for invalid owner error
2023-03-29 16:13:41 -07:00
Nate Smith
72f64cc634
Merge pull request #7080 from heaths/issue7055
Retry fetching repo from template
2023-03-29 16:09:51 -07:00
Nate Smith
d64c19e8fe
Merge pull request #7244 from SonicGDX/patch-1
Fix typo in README.md
2023-03-29 15:45:45 -07:00
vaindil
f21f1ca4ef check SSH key existence before uploading 2023-03-29 17:32:25 -04:00
SonicGDX
66706f0880
Fix typo in README.md
Signed-off-by: SonicGDX<114670430+SonicGDX@users.noreply.github.com>
2023-03-29 17:36:40 +01:00
Benjamin Chadwick
82662685e3
Autocomplete branch flags (#6031)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-03-29 16:09:44 +00:00
Heath Stewart
d104926ce2
Resolve lint error 2023-03-29 08:18:05 -07:00
Heath Stewart
3085c39a73
Specify branch to force exit code 2023-03-29 07:44:17 -07:00
Heath Stewart
36436cb8b8
Retry fetching repo from template
Fixes #7055
2023-03-29 07:44:16 -07:00
nate smith
1fb12a98ea improve test resiliency 2023-03-29 06:25:35 -07:00
Alex Petrov
852bc00354
feat: allow filtering workflow runs by statuses 2023-03-29 18:39:59 -04:00
Mislav Marohnić
944df28f16
repo list: add test for invalid owner error 2023-03-29 11:32:19 +02:00
Marco Carvalho
3b23978114
repo sync: clearer error message with actionable hint (#7110)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-03-28 18:43:31 +00:00