Commit graph

2691 commits

Author SHA1 Message Date
Benjamin Levesque
7cfbf478d5
Diacritics substitution in prompt (#7205) 2023-04-21 14:09:59 +00: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
Lại Tuấn Anh
3d8057d856
fix: normalize hostname for auth login (#6999)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-17 13:35:30 +00:00
Sam Coe
dbc2f05124
Update go-gh to v2 (#7299)
* Update go-gh

* Update code for go-gh v2
2023-04-16 15:34:23 +10: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
Kousik Mitra
7ee35e43cc
Enable owner flag to take multiple values for searching 2023-04-12 10:37:09 +05:30
Nate Smith
a279dd7082
Merge branch 'trunk' into feature/ssh-signing-key 2023-04-11 16:00:56 -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
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
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
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
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
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
vaindil
f21f1ca4ef check SSH key existence before uploading 2023-03-29 17:32:25 -04: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
աɨռɢӄաօռɢ
1f0e53319e
fix: throw error for non-existing org / repo with non-zero status in repo list (#7240) 2023-03-28 19:48:38 +02:00
Nate Smith
2f0bc86740
Merge pull request #7232 from wingkwong/feat/run-view-attempt
feat: gh run view --attempt
2023-03-28 09:50:02 -07:00
Wing-Kam Wong
0dd8261d2b refactor: use net/url JoinPath 2023-03-28 21:25:42 +08:00
Wing-Kam Wong
48ed914d58 refactor: set the default case first 2023-03-28 21:21:11 +08:00