You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): make incident list --channel match sibling list verbs
incident list was the only list verb that filtered by channel via
--channel-id (a single int64), while alert list, alert-event list, and
change list all use --channel (a comma-separated string parsed into
multiple channel IDs). The underlying API (ListIncidentsRequest.ChannelIDs
[]int64) already supports multiple channel IDs, so incident list's flag
was an unnecessary outlier rather than a capability gap.
Add --channel string to incident list, parsed with the same
parseIntSlice helper alert list and change list already use, and forward
it as ChannelIDs. Keep --channel-id working as a deprecated, hidden
single-ID alias via cobra's MarkDeprecated so existing scripts do not
break; --channel wins when both are set.
internal/skilldoc/build.go's command() walked every flag via
Flags().VisitAll without skipping hidden ones, so the generated skill
card for incident list would have kept showing the now-hidden
--channel-id. Filter out hidden flags there, matching the existing
hidden/deprecated skip one level up for commands themselves, then
regenerate skills/flashduty/reference/incident.md via 'make gen-cards'.
Verified:
- go build ./... and go test ./... pass
- 'incident list --help' shows --channel and no longer shows --channel-id
- 'incident list --channel-id 1 --help' still exits 0 and prints pflag's
deprecation notice on stderr
- 'make check-cards' passes, confirming the skill card and CLI flag set
are back in lockstep
cmd.Flags().StringVar(&query, "query", "", "Free-text search across title/labels/content (also resolves a 24-char incident ID or 6-char incident num to a direct lookup)")
151
168
cmd.Flags().StringVar(&nums, "nums", "", "Comma-separated short incident ids (num, the 6-char id shown in the UI) to filter by")
152
169
cmd.Flags().StringVar(&since, "since", "24h", "Start time (duration, date, datetime, or unix timestamp; --since→--until window must be < 31 days)")
0 commit comments