Skip to content

Commit e12be19

Browse files
committed
fix: clarify credential and member id guidance
1 parent f646fbc commit e12be19

5 files changed

Lines changed: 21 additions & 21 deletions

File tree

internal/cli/incident.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ func newIncidentReassignCmd() *cobra.Command {
759759
},
760760
}
761761

762-
cmd.Flags().StringVar(&person, "person", "", "Comma-separated person IDs")
762+
cmd.Flags().StringVar(&person, "person", "", "Comma-separated member IDs from 'flashduty member list'")
763763
_ = cmd.MarkFlagRequired("person")
764764

765765
return cmd
@@ -774,8 +774,8 @@ func newIncidentAddResponderCmd() *cobra.Command {
774774
Short: "Add responders to an incident",
775775
Long: `Add one or more responders to an incident.
776776
777-
Responder IDs are person IDs. Use 'flashduty member list' to find the right
778-
person ID before running this command. Optional notification flags let you ask
777+
Responder IDs are member IDs from 'flashduty member list'. Optional
778+
notification flags let you ask
779779
FlashDuty to notify added responders through their preferences, explicit
780780
personal channels, or a template.`,
781781
Example: ` flashduty member list --name "Ada"
@@ -816,7 +816,7 @@ personal channels, or a template.`,
816816
},
817817
}
818818

819-
cmd.Flags().StringVar(&person, "person", "", "Comma-separated person IDs to add")
819+
cmd.Flags().StringVar(&person, "person", "", "Comma-separated member IDs from 'flashduty member list'")
820820
cmd.Flags().BoolVar(&followPreference, "follow-preference", false, "Follow each responder's notification preferences")
821821
cmd.Flags().StringVar(&notifyChannel, "notify-channel", "", "Comma-separated notification channels, e.g. voice,sms,email")
822822
cmd.Flags().StringVar(&templateID, "template-id", "", "Notification template ID")
@@ -945,8 +945,8 @@ func newIncidentWarRoomCreateCmd() *cobra.Command {
945945
Long: `Create an incident war room in a configured IM integration.
946946
947947
If --integration is omitted, the CLI uses the first war-room-enabled IM
948-
integration returned by FlashDuty. Use --member to invite person IDs directly.
949-
Use 'flashduty member list' to find person IDs. Use --add-observers to also
948+
integration returned by FlashDuty. Use --member to invite member IDs directly.
949+
Use 'flashduty member list' to find member IDs. Use --add-observers to also
950950
invite historical responders selected by FlashDuty.`,
951951
Example: ` flashduty incident war-room create inc_123
952952
flashduty incident war-room create inc_123 --integration 42 --member 101,202
@@ -982,7 +982,7 @@ invite historical responders selected by FlashDuty.`,
982982
}
983983

984984
cmd.Flags().Int64Var(&integrationID, "integration", 0, "IM integration ID; if omitted, first war-room-enabled IM integration is used")
985-
cmd.Flags().StringVar(&member, "member", "", "Comma-separated member person IDs to invite")
985+
cmd.Flags().StringVar(&member, "member", "", "Comma-separated member IDs to invite")
986986
cmd.Flags().BoolVar(&addObservers, "add-observers", false, "Invite historical responders as extra war-room members")
987987
return cmd
988988
}
@@ -1125,9 +1125,8 @@ func newIncidentWarRoomAddMemberCmd() *cobra.Command {
11251125
Long: `Add members to an existing incident war room by IM chat ID.
11261126
11271127
This command requires --integration because chat IDs are scoped to an IM
1128-
integration. Member IDs are person IDs. Use 'flashduty member list' to find
1129-
person IDs, and 'flashduty incident war-room list' to find chat and integration
1130-
IDs.`,
1128+
integration. Use 'flashduty member list' to find member IDs, and
1129+
'flashduty incident war-room list' to find chat and integration IDs.`,
11311130
Example: ` flashduty member list --name "Ada"
11321131
flashduty incident war-room list inc_123
11331132
flashduty incident war-room add-member chat_123 --integration 42 --member 101,202`,
@@ -1155,7 +1154,7 @@ IDs.`,
11551154
}
11561155

11571156
cmd.Flags().Int64Var(&integrationID, "integration", 0, "IM integration ID (required)")
1158-
cmd.Flags().StringVar(&member, "member", "", "Comma-separated member person IDs (required)")
1157+
cmd.Flags().StringVar(&member, "member", "", "Comma-separated member IDs (required)")
11591158
_ = cmd.MarkFlagRequired("integration")
11601159
_ = cmd.MarkFlagRequired("member")
11611160
return cmd

internal/cli/zz_generated_incidents.go

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

skills/flashduty/reference/automation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fduty automation fire <trigger-id> \
101101
--output-format toon
102102
```
103103

104-
`--dedup-key` makes retries idempotent for the same trigger. Do not invent a token; if it is missing, ask the user for the token or rotate the trigger token through `update`.
104+
`--dedup-key` makes retries idempotent for the same trigger. Do not invent a token. If it is missing, rotate the trigger token through `update` or ask the user to provide it through their secure shell/environment, not in chat.
105105

106106
<!-- GENERATED:automation START · 由 fduty __dump-commands 同步 · 勿手改 fence 内 -->
107107

skills/flashduty/reference/channel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ fduty channel create --channel-name "production-api" --team-id <team-id> \
3838
# → returns channel_id; use it below
3939

4040
# 3. add an escalation rule (all flags; layers is required via --data)
41+
# API field `person_ids` expects member IDs from `fduty member list`.
4142
fduty channel escalate-rule-create \
4243
--channel-id <channel-id> --rule-name "P1 on-call" --template-id <template-id> \
4344
--data '{"layers":[{"target":{"person_ids":[<member-id>],"by":{"critical":["voice","sms"],"warning":["feishu"]}},"notify_step":5,"max_times":3,"escalate_window":30}]}'

skills/flashduty/reference/incident.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Prereq: `SKILL.md` read. Read verbs are free. **Mutating verbs notify responders
3131
| resolve with optional note | `resolve <incident-id> [<id2>...]` |
3232
| snooze / un-snooze | `snooze <id> [<id2>...]` / `wake <incident-id> [<id2>...]` |
3333
| add comment | `comment <id> [<id2>...]` |
34-
| add responder by person ID | `add-responder <id>` |
34+
| add responder by member ID | `add-responder <id>` |
3535
| replace responder list | `reassign <id>` |
3636
| merge duplicates (IRREVERSIBLE) | `merge <target_id>` |
3737
| stop auto-merging alerts in | `disable-merge <incident-id> [<id2>...]` |
@@ -317,10 +317,10 @@ Resolve incident
317317
- `--resolution` string — Optional resolution note applied to every resolved incident. (≤1024 chars)
318318
- `--root-cause` string — Optional root cause note applied to every resolved incident. (≤1024 chars)
319319

320-
### responder-add <person-id> [<id2>...]
320+
### responder-add <member-id> [<id2>...]
321321
Add incident responder
322322
- `--incident-id` string (required) — Incident ID (MongoDB ObjectID).
323-
- `<person-ids>` (positional, required) intSlice — Member IDs to add as responders.
323+
- `<member-ids>` (positional, required) intSlice — Member IDs from `member list` to add as responders. The API field is named `person_ids`.
324324
- body-only (`--data`): notify (object)
325325

326326
### similar <id>
@@ -380,7 +380,7 @@ List incident war rooms
380380
Add war-room member
381381
- `<chat-id>` (positional, required) string — Chat ID of the war room within the IM platform.
382382
- `--integration-id` int64 (required) — IM integration that hosts the war room.
383-
- `--member-ids` intSlice (required) — Person IDs to add to the war room.
383+
- `--member-ids` intSlice (required) — Member IDs to add to the war room.
384384

385385
### war-room-create
386386
Create war room
@@ -424,7 +424,7 @@ List war rooms
424424
- **`--list` window cap**: `--since`/`--until` window must be < 31 days; `--limit` max 100. Empty result is authoritative — do not widen filters or retry.
425425
- **`merge` is irreversible**: source incidents are absorbed into target permanently. Always list and confirm both IDs before running.
426426
- **`remove --force`** bypasses the interactive confirmation prompt — never pass `--force` unless the user has explicitly said so.
427-
- **`assign` needs `--data` for the nested `assigned_to` object** (either `person_ids` or `escalate_rule_id`). Pass via `--data '{"incident_ids":["<id>"],"assigned_to":{"person_ids":[101]}}'`. `reassign <id> --person <ids>` is simpler for direct-person assignment.
427+
- **`assign` needs `--data` for the nested `assigned_to` object** (either `person_ids` or `escalate_rule_id`). Pass member IDs from `member list` in the API field: `--data '{"incident_ids":["<id>"],"assigned_to":{"person_ids":[101]}}'`. `reassign <id> --person <ids>` is simpler for direct member assignment.
428428

429429
## Worked example
430430

0 commit comments

Comments
 (0)