Skip to content

Commit ecb79c4

Browse files
committed
Remove group export command (monitor export --group covers this)
https://claude.ai/code/session_01UDueW9A6SuxugCcsbAMfdB
1 parent 0e7bd3a commit ecb79c4

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ cronitor group update <key> -d '{"monitors":["job1","job2"]}'
109109
cronitor group delete <key>
110110
cronitor group pause <key> 24 # Pause all monitors for 24 hours
111111
cronitor group resume <key> # Resume all monitors
112-
cronitor group export -o groups.json # Export all groups
113112
```
114113

115114
#### Environments

cmd/group.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ func init() {
3939
groupCmd.AddCommand(groupDeleteCmd)
4040
groupCmd.AddCommand(groupPauseCmd)
4141
groupCmd.AddCommand(groupResumeCmd)
42-
groupCmd.AddCommand(groupExportCmd)
4342

4443
// Persistent flags for all group subcommands
4544
groupCmd.PersistentFlags().IntVar(&groupPage, "page", 1, "Page number for paginated results")
@@ -407,33 +406,6 @@ Examples:
407406
},
408407
}
409408

410-
// --- EXPORT ---
411-
var groupExportCmd = &cobra.Command{
412-
Use: "export",
413-
Short: "Export all groups as JSON",
414-
Long: `Export all groups by fetching all pages into a single JSON array.
415-
416-
Examples:
417-
cronitor group export # Print to stdout
418-
cronitor group export -o groups.json # Save to file`,
419-
Run: func(cmd *cobra.Command, args []string) {
420-
client := lib.NewAPIClient(dev, log)
421-
params := make(map[string]string)
422-
423-
if groupEnv != "" {
424-
params["env"] = groupEnv
425-
}
426-
427-
bodies, err := FetchAllPages(client, "/groups", params, "groups")
428-
if err != nil {
429-
Error(fmt.Sprintf("Failed to export groups: %s", err))
430-
os.Exit(1)
431-
}
432-
433-
outputGroupToTarget(FormatJSON(MergePagedJSON(bodies, "groups")))
434-
},
435-
}
436-
437409
func init() {
438410
// List command flags
439411
groupListCmd.Flags().IntVar(&groupPageSize, "page-size", 0, "Number of results per page")

0 commit comments

Comments
 (0)