Add --json flag support to more bd commands
- stats: Added --json flag for programmatic output - show, update: Added --json flag for issue details - close, reopen: Added --json flag for bulk operations - dep (add, remove, tree, cycles): Added --json flags - label (add, remove, list, list-all): Added --json flags - duplicates, merge: Added --json flags Closes bd-4dcd2d09
This commit is contained in:
@@ -22,6 +22,7 @@ This is more explicit than 'bd update --status open' and emits a Reopened event.
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
reason, _ := cmd.Flags().GetString("reason")
|
||||
jsonOutput, _ := cmd.Flags().GetBool("json")
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
@@ -146,5 +147,6 @@ This is more explicit than 'bd update --status open' and emits a Reopened event.
|
||||
|
||||
func init() {
|
||||
reopenCmd.Flags().StringP("reason", "r", "", "Reason for reopening")
|
||||
reopenCmd.Flags().Bool("json", false, "Output JSON format")
|
||||
rootCmd.AddCommand(reopenCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user