-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
status.go
29 lines (24 loc) · 992 Bytes
/
status.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
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh"
"github.com/spf13/cobra"
)
var statusCmd = &cobra.Command{
Use: "status",
Short: "Print information about relevant issues, pull requests, and notifications across repositories",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(statusCmd).Standalone()
statusCmd.Flags().StringSliceP("exclude", "e", []string{}, "Comma separated list of repos to exclude in owner/name format")
statusCmd.Flags().StringP("org", "o", "", "Report status within an organization")
rootCmd.AddCommand(statusCmd)
carapace.Gen(statusCmd).FlagCompletion(carapace.ActionMap{
"exclude": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionOwnerRepositories(statusCmd).NoSpace()
}),
"org": gh.ActionOrganizations(gh.HostOpts{}),
})
}