Skip to content

Commit 604ea11

Browse files
committed
chore(deps): bump go-flashduty to v0.15.7
AlertInfo now carries detail_url, so incident alerts keeps the console URL. Incident list and similar default columns also keep num and detail_url.
1 parent 00800d8 commit 604ea11

10 files changed

Lines changed: 31 additions & 26 deletions

File tree

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli
33
go 1.25.1
44

55
require (
6-
github.com/flashcatcloud/go-flashduty v0.15.6
6+
github.com/flashcatcloud/go-flashduty v0.15.7
77
github.com/mattn/go-runewidth v0.0.29
88
github.com/spf13/cobra v1.10.2
99
github.com/spf13/pflag v1.0.10

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
22
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
33
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
4-
github.com/flashcatcloud/go-flashduty v0.15.6 h1:RLLsB3qNp6thDaLLgu2n6Dx2iBThl836gkmu+4UPbBk=
5-
github.com/flashcatcloud/go-flashduty v0.15.6/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk=
4+
github.com/flashcatcloud/go-flashduty v0.15.7 h1:3bnopTmY2w6zUbPSV2MpLrHdzl1fr3hEM3DDbbj4cOY=
5+
github.com/flashcatcloud/go-flashduty v0.15.7/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk=
66
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
77
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
88
github.com/mattn/go-runewidth v0.0.29 h1:3oGF3R/S2N9DQ3ptftzVIvg2eicmojCzlwBEmqEPDfQ=

‎internal/cli/fieldproject_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestIncidentListStructuredDefaultUsesCompactProjection(t *testing.T) {
278278
t.Fatalf("execCommandSplit: %v", err)
279279
}
280280

281-
assertProjectedJSONFields(t, out, []string{"incident_id", "title", "incident_severity", "progress", "start_time", "channel_id"})
281+
assertProjectedJSONFields(t, out, []string{"incident_id", "num", "title", "incident_severity", "progress", "start_time", "channel_id", "detail_url"})
282282
if !strings.Contains(stderrText, "note: rows projected to default compact fields") {
283283
t.Errorf("default projection should announce itself on stderr, got:\n%s", stderrText)
284284
}
@@ -296,7 +296,7 @@ func TestIncidentListStructuredDefaultUsesCompactProjection(t *testing.T) {
296296

297297
// Positive keys must come from stdout alone: the stderr note embeds the
298298
// same field names, so a merged capture would satisfy this vacuously.
299-
for _, key := range []string{"incident_id", "title", "incident_severity", "progress", "start_time", "channel_id"} {
299+
for _, key := range []string{"incident_id", "num", "title", "incident_severity", "progress", "start_time", "channel_id", "detail_url"} {
300300
if !strings.Contains(out, key) {
301301
t.Errorf("default toon output missing compact key %q, got:\n%s", key, out)
302302
}
@@ -572,7 +572,7 @@ func TestIncidentSimilarStructuredProjection(t *testing.T) {
572572
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &rows); err != nil {
573573
t.Fatalf("parse compact similar json: %v\n%s", err, out)
574574
}
575-
want := []string{"incident_id", "title", "incident_severity", "progress", "start_time", "close_time", "ack_time", "alert_cnt", "root_cause", "score"}
575+
want := []string{"incident_id", "num", "title", "incident_severity", "progress", "start_time", "close_time", "ack_time", "alert_cnt", "root_cause", "score", "detail_url"}
576576
if len(rows) != len(items) {
577577
t.Fatalf("got %d rows, want %d", len(rows), len(items))
578578
}

‎internal/cli/incident.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ func newIncidentListCmd() *cobra.Command {
7575
var progress, severity, query, since, until, nums, fields, channel string
7676
var channelID int64
7777
var limit, page int
78-
defaultStructuredFields := []string{"incident_id", "title", "incident_severity", "progress", "start_time", "channel_id"}
78+
defaultStructuredFields := []string{"incident_id", "num", "title", "incident_severity", "progress", "start_time", "channel_id", "detail_url"}
7979

8080
cmd := &cobra.Command{
8181
Use: "list",
8282
Short: "List incidents",
83-
Long: curatedLong("List incidents matching the given filters. The --since/--until window must be < 31 days; --limit max is 100. In json/toon mode, rows default to the compact fields incident_id,title,incident_severity,progress,start_time,channel_id; pass --fields to choose a different projection.\n\nSee also: fduty insight <team|responder|channel> for aggregated metrics (MTTA, MTTR, noise reduction), fduty insight incident-list for metric-rich filtered incident rows, and fduty insight incident-export for CSV incident exports.", "Incidents", "List"),
83+
Long: curatedLong("List incidents matching the given filters. The --since/--until window must be < 31 days; --limit max is 100. In json/toon mode, rows default to the compact fields incident_id,num,title,incident_severity,progress,start_time,channel_id,detail_url; pass --fields to choose a different projection.\n\nSee also: fduty insight <team|responder|channel> for aggregated metrics (MTTA, MTTR, noise reduction), fduty insight incident-list for metric-rich filtered incident rows, and fduty insight incident-export for CSV incident exports.", "Incidents", "List"),
8484
RunE: func(cmd *cobra.Command, args []string) error {
8585
return runCommand(cmd, args, func(ctx *RunContext) error {
8686
startTime, err := timeutil.Parse(since)
@@ -629,7 +629,7 @@ func newIncidentSimilarCmd() *cobra.Command {
629629
}
630630

631631
if ctx.Structured() {
632-
fieldNames := []string{"incident_id", "title", "incident_severity", "progress", "start_time", "close_time", "ack_time", "alert_cnt", "root_cause", "score"}
632+
fieldNames := []string{"incident_id", "num", "title", "incident_severity", "progress", "start_time", "close_time", "ack_time", "alert_cnt", "root_cause", "score", "detail_url"}
633633
if fields != "" {
634634
fieldNames = parseStringSlice(fields)
635635
} else {

‎internal/cli/incident_summary_script_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestIncidentSummaryScriptCompactOutput(t *testing.T) {
3939
if len(lines) != 6 {
4040
t.Fatalf("fduty calls = %d, want 6:\n%s", len(lines), invocations)
4141
}
42-
wantDetail := "incident detail inc-1 --fields incident_id,title,incident_severity,progress,ai_summary,root_cause,resolution,alert_cnt,start_time,channel_id --output-format toon"
42+
wantDetail := "incident detail inc-1 --fields incident_id,num,title,incident_severity,progress,ai_summary,root_cause,resolution,alert_cnt,start_time,channel_id,detail_url --output-format toon"
4343
if lines[0] != wantDetail {
4444
t.Fatalf("detail call = %q, want compact projection %q", lines[0], wantDetail)
4545
}

‎internal/cli/zz_generated_incidents.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)