cli/pkg/cmd/codespace
Luan Vieira d4c9890c5a
Default to authenticated user on codespace delete (#6944)
When a username option is not provided for the `gh codespace delete`
command, we will use the authenticated user's login as the default to
avoid deleting anyone else's codespace by mistake.

Prior to this change, running `gh codespace delete --org MYORG --all`
would fetch all of the codespacese associated with the org regardless of
user and then only delete the ones associated with the authenticated
user, which would lead to 404 errors when MYORG had codespaces owned by
members other than the authenticated member.

Co-authored-by: Victoria Dye <vdye@github.com>
Co-authored-by: Lessley Dennington <ldennington@github.com>
2023-02-07 20:46:08 +01:00
..
code.go Add codespace open --web flag (#5380) 2022-04-11 19:09:27 +02:00
code_test.go Clean up API interface 2022-09-16 22:25:11 +00:00
common.go Default to authenticated user on codespace delete (#6944) 2023-02-07 20:46:08 +01:00
common_test.go Fix typo in has_uncommitted_changes for codespaces (#6812) 2023-01-05 22:02:32 +00:00
create.go Codespaces create: Fix missing billable owner notice for individuals (#6891) 2023-01-23 13:15:44 +01:00
create_test.go Codespaces create: Fix missing billable owner notice for individuals (#6891) 2023-01-23 13:15:44 +01:00
delete.go Default to authenticated user on codespace delete (#6944) 2023-02-07 20:46:08 +01:00
delete_test.go Default to authenticated user on codespace delete (#6944) 2023-02-07 20:46:08 +01:00
edit.go cs edit: 💅 implementation and tests 2022-06-01 17:18:17 +02:00
edit_test.go cs edit: 💅 implementation and tests 2022-06-01 17:18:17 +02:00
jupyter.go Close port forward writer on reader 2023-01-19 20:22:24 -06:00
list.go linter 2022-12-12 21:21:23 +00:00
list_test.go Codespaces list by repo (#5854) 2022-06-28 13:34:04 +00:00
logs.go Close port forward writer on reader 2023-01-19 20:22:24 -06:00
logs_test.go Clean up API interface 2022-09-16 22:25:11 +00:00
mock_api.go Default to authenticated user on codespace delete (#6944) 2023-02-07 20:46:08 +01:00
mock_prompter.go Go 1.19: fix comment formatting for moq-generated mocks 2022-12-12 16:58:25 +01:00
ports.go Close port forward writer on reader 2023-01-19 20:22:24 -06:00
ports_test.go Clean up API interface 2022-09-16 22:25:11 +00:00
rebuild.go Remove unused token field 2023-01-06 09:56:16 -08:00
rebuild_test.go Use incremental rebuild by default 2022-11-01 21:00:14 +00:00
root.go Add rebuild command 2022-10-08 06:12:36 +00:00
select.go Linter fixes (#6722) 2022-12-12 15:27:32 +00:00
select_test.go Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
ssh.go Close port forward writer on reader 2023-01-19 20:22:24 -06:00
ssh_test.go Linter fixes (#6722) 2022-12-12 15:27:32 +00:00
stop.go Codespaces list by repo (#5854) 2022-06-28 13:34:04 +00:00
stop_test.go Add support for org admins to stop a members codespace (#5812) 2022-06-22 13:56:22 +02:00