* Resolves the change-detection revision for a work item. ADO returns the * revision as the top-level `rev` property on each batch item; `System.Rev` is * not guaranteed to be echoed in the requested `fields`, so `rev` is the * authoritative source. Falls back to the in-fields rev, then `System.C
(raw: RawWorkItem, fields: Record<string, unknown>)
| 292 | * authoritative source. Falls back to the in-fields rev, then `System.ChangedDate`. |
| 293 | */ |
| 294 | function resolveWorkItemRev(raw: RawWorkItem, fields: Record<string, unknown>): string { |
| 295 | if (typeof raw.rev === 'number') return String(raw.rev) |
| 296 | const fieldRev = fields['System.Rev'] |
| 297 | if (typeof fieldRev === 'number') return String(fieldRev) |
| 298 | const changed = fields['System.ChangedDate'] |
| 299 | if (typeof changed === 'string' && changed) return changed |
| 300 | return '0' |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * Fetches the list of wikis in the configured project. Returns an empty list on |
no outgoing calls
no test coverage detected