Skip to content

Commit 19bc627

Browse files
committed
fix(ssh): add argument validation to webhook deliveries commands
1 parent 45855b6 commit 19bc627

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/ssh/cmd/webhooks.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ func webhookDeliveriesRedeliverCommand() *cobra.Command {
313313
cmd := &cobra.Command{
314314
Use: "redeliver REPOSITORY WEBHOOK_ID DELIVERY_ID",
315315
Short: "Redeliver a webhook delivery",
316+
Args: cobra.ExactArgs(3),
316317
PersistentPreRunE: checkIfAdmin,
317318
RunE: func(cmd *cobra.Command, args []string) error {
318319
ctx := cmd.Context()
@@ -343,6 +344,7 @@ func webhookDeliveriesGetCommand() *cobra.Command {
343344
cmd := &cobra.Command{
344345
Use: "get REPOSITORY WEBHOOK_ID DELIVERY_ID",
345346
Short: "Get a webhook delivery",
347+
Args: cobra.ExactArgs(3),
346348
PersistentPreRunE: checkIfAdmin,
347349
RunE: func(cmd *cobra.Command, args []string) error {
348350
ctx := cmd.Context()

0 commit comments

Comments
 (0)