MCPcopy
hub / github.com/claude-code-best/claude-code / listWorkflowRuns

Function listWorkflowRuns

src/utils/workflowRuns.ts:117–135  ·  view source on GitHub ↗
(
  rootDir: string = getProjectRoot(),
)

Source from the content-addressed store, hash-verified

115}
116
117export async function listWorkflowRuns(
118 rootDir: string = getProjectRoot(),
119): Promise<WorkflowRunRecord[]> {
120 let files: string[]
121 try {
122 files = await readdir(join(rootDir, WORKFLOW_RUNS_REL))
123 } catch {
124 return []
125 }
126 const jsonFiles = files.filter(file => file.endsWith('.json'))
127 const runs = await Promise.all(
128 jsonFiles
129 .slice(0, MAX_WORKFLOW_RUNS)
130 .map(file => readWorkflowRun(rootDir, file.slice(0, -'.json'.length))),
131 )
132 return runs
133 .filter((run): run is WorkflowRunRecord => run !== null)
134 .sort((a, b) => b.updatedAt - a.updatedAt)
135}
136
137export function formatWorkflowRunsStatus(runs: WorkflowRunRecord[]): string {
138 if (runs.length === 0) {

Callers 1

Calls 3

getProjectRootFunction · 0.85
readdirFunction · 0.85
readWorkflowRunFunction · 0.85

Tested by

no test coverage detected