(content: string)
| 10 | } |
| 11 | |
| 12 | export function countTasksFromContent(content: string): TaskProgress { |
| 13 | const lines = content.split('\n'); |
| 14 | let total = 0; |
| 15 | let completed = 0; |
| 16 | for (const line of lines) { |
| 17 | if (line.match(TASK_PATTERN)) { |
| 18 | total++; |
| 19 | if (line.match(COMPLETED_TASK_PATTERN)) { |
| 20 | completed++; |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | return { total, completed }; |
| 25 | } |
| 26 | |
| 27 | export async function getTaskProgressForChange(changesDir: string, changeName: string): Promise<TaskProgress> { |
| 28 | const tasksPath = path.join(changesDir, changeName, 'tasks.md'); |
no outgoing calls
no test coverage detected