Skip to content

feat(cli): incident info --num + channel team/creator names (fc-event#1674)#52

Merged
ysyneu merged 1 commit into
feat/ai-srefrom
chore/cli-enrich-1674
Jun 16, 2026
Merged

feat(cli): incident info --num + channel team/creator names (fc-event#1674)#52
ysyneu merged 1 commit into
feat/ai-srefrom
chore/cli-enrich-1674

Conversation

@ysyneu

@ysyneu ysyneu commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Final link in the docs → SDK → CLI chain for fc-event#1674. Depends on go-flashduty#11 (pins its branch commit via pseudo-version).

Changes

  • incident info — new --num flag (server-side 6-char short-id lookup; the backend relaxed incident_id to optional and resolves num to the most-recent match). This replaces the old client-side incident list --query <num>incident info two-step dance for the generated twin.
  • channel list / channel info — response help now documents team_name + creator_name; the fields flow through the regenerated go-flashduty ChannelItem (visible in --json/--toon).

cligen enhancement — optional positional (no back-compat loss)

Relaxing incident_id to optional would have dropped the generated incident info <id> positional (cligen only pins required *_id fields → gen_positional_test contract break). Rather than lose it, added a 0-or-1 optional positional mode:

  • positional.Optional + optionalPositional map (pins incidentInfoincident_id, marked optional)
  • optionalArg(name) validator (0-or-1; rejects >1)

Result:

incident info <id>           # positional → incident_id (back-compat)
incident info --num CBE249    # short-id (new)
incident info                 # 0 args + --num → valid (reaches backend)
incident info a b             # rejected: "expects at most one incident_id"

Verification

go build ./... + go test ./internal/... (incl. updated gen_positional) pass. End-to-end smoke confirms the Usage line incident info [<incident-id>] and arg arities.

Landing note

go-flashduty is pinned to the chore/enrich-1674-spec commit as a pseudo-version so this PR is CI-green now. After go-flashduty#11 merges + releases, re-pin go.mod to the released version (one-line go get), then this is final.

Chain (merge in order)

  1. flashduty-docs#89 → docs main
  2. go-flashduty#11 → go-flashduty main (+ release)
  3. this PR → flashduty-cli feat/ai-sre

…#1674)

Propagate fc-event#1674 through the generated layer by bumping go-flashduty to
the synced+regenerated spec, plus a cligen enhancement so the now-optional
incident_id stays back-compatible:

- incident info: new --num flag (server-side 6-char short-id lookup); incident_id
  relaxed to optional. Add an OPTIONAL positional mode to cligen (optionalArg +
  positional.Optional + optionalPositional map) so `incident info <id>` keeps
  working while `incident info --num CBE249` resolves and bare `incident info`
  (with --num) is valid; `incident info a b` still rejected.
- channel list/info: response help documents team_name + creator_name.

go-flashduty pinned to the chore/enrich-1674-spec commit (pseudo-version);
re-pin to the released version after go-flashduty#11 merges. Build + unit tests
(incl. gen_positional) pass.
@ysyneu ysyneu merged commit d4a8e55 into feat/ai-sre Jun 16, 2026
12 checks passed
ysyneu added a commit that referenced this pull request Jun 16, 2026
#52 merged at the pre-re-pin commit, so feat/ai-sre pinned the go-flashduty#11
PR-branch commit (da82c4) rather than the squash-merged main commit. Re-pin to
go-flashduty main (54d4fc1) so the dependency tracks main, not an orphaned
PR-branch commit kept alive only by the closed PR. Generated output unchanged
(identical spec); build + unit tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant