MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveWorkItemRev

Function resolveWorkItemRev

apps/sim/connectors/azure-devops/azure-devops.ts:294–301  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

292 * authoritative source. Falls back to the in-fields rev, then `System.ChangedDate`.
293 */
294function 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

Callers 1

workItemToDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected