-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
project_delete.go
38 lines (32 loc) · 1.21 KB
/
project_delete.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh"
"github.com/spf13/cobra"
)
var project_deleteCmd = &cobra.Command{
Use: "delete [<number>]",
Short: "Delete a project",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(project_deleteCmd).Standalone()
project_deleteCmd.Flags().String("format", "", "Output format: {json}")
project_deleteCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
project_deleteCmd.Flags().String("owner", "", "Login of the owner. Use \"@me\" for the current user.")
project_deleteCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
projectCmd.AddCommand(project_deleteCmd)
carapace.Gen(project_deleteCmd).FlagCompletion(carapace.ActionMap{
"format": carapace.ActionValues("json"),
"owner": gh.ActionOwners(gh.HostOpts{}),
})
carapace.Gen(project_deleteCmd).PositionalCompletion(
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
return gh.ActionProjects(gh.ProjectOpts{
Owner: project_deleteCmd.Flag("owner").Value.String(),
Open: true,
Closed: true,
})
}),
)
}