mime-todo-cli/src/commands/IssueListCommand.ts
2026-03-15 05:11:59 +01:00

17 lines
562 B
TypeScript

import type { ArgumentsCamelCase } from "yargs"
import { CLICommand } from "../cli/CLICommand.js"
import { parseTodoFile } from "../file.js"
export class IssueListCommand extends CLICommand {
readonly name = "list"
readonly help = "List all issues"
readonly description = "List all issues in the TODO file"
async execute(args: ArgumentsCamelCase): Promise<number> {
const todo = await parseTodoFile()
for (const issue of todo.issues) {
console.log(`#${issue.id} [${issue.type}] (${issue.status}) ${issue.title}`)
}
return 0
}
}