init
This commit is contained in:
commit
932d4ad420
46 changed files with 5800 additions and 0 deletions
17
lib/commands/IssueListCommand.ts
Normal file
17
lib/commands/IssueListCommand.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { ArgumentsCamelCase } from "yargs"
|
||||
import { CLICommand } from "../cli/CLICommand"
|
||||
import { parseTodoFile } from "../file"
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue