ID is not returned on schedule creation
Problem to solve
Currently, the successful output of the schedule create
command only returns "Created schedule" and does not provide any other information. By returning the ID of the created schedule as well, we can allow consumers to further manipulate the created schedule however they want.
This also standardize schedule commands, since delete
, run
and update
already return the ID of the given schedule currently.
Proposal
Return the ID of the newly created schedule as the output of the schedule create
command.
Further details
One example where this would be useful is when the user wants to manipulate the newly created schedule right after the creation. For example, the user might want to run the schedule as soon as it is created, instead of waiting for the next cron job run.
Links / references
-
delete.go
file including the ID on the output: https://gitlab.com/gitlab-org/cli/-/blob/main/commands/schedule/delete/delete.go?ref_type=heads -
run.go
file including the ID on the output: https://gitlab.com/gitlab-org/cli/-/blob/main/commands/schedule/run/run.go?ref_type=heads -
update.go
file including the ID on the output: https://gitlab.com/gitlab-org/cli/-/blob/main/commands/schedule/update/update.go?ref_type=heads
Edited by Douglas Pinheiro Goulart