Skip to content

Commit

Permalink
fix: move output flag to insights command (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Aug 30, 2024
1 parent 2814486 commit be7f8cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/insights/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package insights

import (
"github.com/spf13/cobra"

"github.com/open-sauced/pizza-cli/pkg/constants"
)

// NewInsightsCommand returns a new cobra command for 'pizza insights'
Expand All @@ -14,6 +16,7 @@ func NewInsightsCommand() *cobra.Command {
return cmd.Help()
},
}
cmd.PersistentFlags().StringP(constants.FlagNameOutput, "o", constants.OutputTable, "The formatting for command output. One of: (table, yaml, csv, json)")
cmd.AddCommand(NewContributorsCommand())
cmd.AddCommand(NewRepositoriesCommand())
cmd.AddCommand(NewUserContributionsCommand())
Expand Down
1 change: 0 additions & 1 deletion cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func NewRootCommand() (*cobra.Command, error) {
cmd.PersistentFlags().StringP(constants.FlagNameEndpoint, "e", constants.EndpointProd, "The API endpoint to send requests to")
cmd.PersistentFlags().Bool(constants.FlagNameBeta, false, fmt.Sprintf("Shorthand for using the beta OpenSauced API endpoint (\"%s\"). Supersedes the '--%s' flag", constants.EndpointBeta, constants.FlagNameEndpoint))
cmd.PersistentFlags().Bool(constants.FlagNameTelemetry, false, "Disable sending telemetry data to OpenSauced")
cmd.PersistentFlags().StringP(constants.FlagNameOutput, "o", constants.OutputTable, "The formatting for command output. One of: (table, yaml, csv, json)")
cmd.PersistentFlags().StringP("config", "c", "~/.sauced.yaml", "The saucectl config")
cmd.PersistentFlags().StringP("log-level", "l", "info", "The logging level. Options: error, warn, info, debug")
cmd.PersistentFlags().Bool("tty-disable", false, "Disable log stylization. Suitable for CI/CD and automation")
Expand Down

0 comments on commit be7f8cd

Please sign in to comment.