MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / detailIssue

Function detailIssue

src/workspaces/issues/board.ts:245–262  ·  view source on GitHub ↗
(
  issue: IssueRecord,
  markers: IssueFiringMarkers | null,
  workspaceTag?: string,
)

Source from the content-addressed store, hash-verified

243/** Map a validated issue (+ its firing markers, iff scheduled) to the detail
244 * issue shape. Keeps the body and the scheduling frontmatter the board drops. */
245export function detailIssue(
246 issue: IssueRecord,
247 markers: IssueFiringMarkers | null,
248 workspaceTag?: string,
249): IssueDetailIssue {
250 return {
251 id: issue.id,
252 title: issue.title,
253 body: issue.body,
254 status: issue.status,
255 priority: issue.priority,
256 assignee: issueAssigneeForWorkspace(issue, workspaceTag),
257 ...(issue.when ? { when: issue.when } : {}),
258 ...(issue.what ? { what: issue.what } : {}),
259 ...(issue.agent ? { agent: issue.agent } : {}),
260 ...(markers ? { lastFiredAtMs: markers.lastFiredAtMs, nextDueAtMs: markers.nextDueAtMs } : {}),
261 }
262}
263
264/** Map one validated issue (+ its firing markers, iff scheduled) to a board row.
265 * Pure: the caller resolves `markers` for scheduled issues and passes `null` for

Callers 3

issueDetailFunction · 0.85
board.spec.tsFile · 0.85
buildFunction · 0.85

Calls 1

Tested by 1

buildFunction · 0.68