Commit 91984e3
committed
feat(cli): migrate incident feed + insight responder off legacy SDK
Move the last two read commands that were pinned to the hand-written SDK onto
go-flashduty:
- insight responder: now calls Analytics.ByResponder. Drops the EMAIL column —
the backend /insight/responder (RspdIncMetrics) never returns an email, so the
legacy SDK's ResponderInsightItem.Email was always blank (a decode-only field).
- incident feed: now calls Incidents.Feed. go-flashduty returns raw feed items,
so resolveFeedOperators() replicates the legacy operator-name enrichment by
resolving each entry's creator_id via Members.PersonInfos (best-effort; falls
back to the numeric ID, or 'system' for creator_id 0).
Removes the now-dead GetIncidentFeed + QueryInsightByResponder from the
flashdutyClient interface and mockClient, and rewrites the feed-empty test to use
the gfStub httptest seam. Build/vet/gofmt/test green; both commands live-verified
against api-dev (responder lists real data sans EMAIL; feed resolves operator
names).1 parent e3da654 commit 91984e3
4 files changed
Lines changed: 65 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
| |||
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 196 | | |
205 | 197 | | |
206 | 198 | | |
| |||
666 | 658 | | |
667 | 659 | | |
668 | 660 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | 661 | | |
676 | 662 | | |
677 | | - | |
| 663 | + | |
| 664 | + | |
678 | 665 | | |
679 | 666 | | |
680 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1180 | 1179 | | |
1181 | 1180 | | |
1182 | 1181 | | |
| |||
1186 | 1185 | | |
1187 | 1186 | | |
1188 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1189 | 1194 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1193 | 1207 | | |
1194 | | - | |
| 1208 | + | |
1195 | 1209 | | |
1196 | 1210 | | |
1197 | 1211 | | |
| |||
1210 | 1224 | | |
1211 | 1225 | | |
1212 | 1226 | | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1213 | 1258 | | |
1214 | 1259 | | |
1215 | 1260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 159 | | |
164 | | - | |
| 160 | + | |
165 | 161 | | |
166 | 162 | | |
167 | 163 | | |
| |||
171 | 167 | | |
172 | 168 | | |
173 | 169 | | |
174 | | - | |
| 170 | + | |
175 | 171 | | |
176 | 172 | | |
177 | 173 | | |
| |||
181 | 177 | | |
182 | 178 | | |
183 | 179 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 180 | + | |
188 | 181 | | |
189 | 182 | | |
190 | | - | |
| 183 | + | |
191 | 184 | | |
192 | 185 | | |
193 | | - | |
| 186 | + | |
194 | 187 | | |
195 | 188 | | |
196 | | - | |
| 189 | + | |
197 | 190 | | |
198 | 191 | | |
199 | | - | |
| 192 | + | |
200 | 193 | | |
201 | 194 | | |
202 | | - | |
| 195 | + | |
203 | 196 | | |
204 | 197 | | |
205 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
0 commit comments