Add update-details command to allow setting an issue details via CLI non-interactively.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "4.31.2"
|
||||
version = "4.32.0"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Personal issue tracker."
|
||||
license = "MIT"
|
||||
|
||||
11
src/pit.nim
11
src/pit.nim
@@ -306,6 +306,17 @@ when isMainModule:
|
||||
issue.store()
|
||||
updatedIssues.add(issue)
|
||||
|
||||
elif args["update-details"]:
|
||||
let details =
|
||||
if not args["--file"] or $args["--file"] == "-": readAll(stdin)
|
||||
else: readFile($args["--file"])
|
||||
|
||||
for id in @(args["<id>"]):
|
||||
var issue = ctx.cfg.tasksDir.loadIssueById(id)
|
||||
issue.details = details
|
||||
issue.store()
|
||||
updatedIssues.add(issue)
|
||||
|
||||
elif args["start"] or args["todo-today"] or args["done"] or
|
||||
args["pending"] or args["todo"] or args["suspend"]:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const PIT_VERSION* = "4.31.2"
|
||||
const PIT_VERSION* = "4.32.0"
|
||||
|
||||
const USAGE* = """Usage:
|
||||
pit ( new | add) <summary> [<state>] [options]
|
||||
@@ -10,6 +10,7 @@ const USAGE* = """Usage:
|
||||
pit ( start | done | pending | todo-today | todo | suspend ) <id>... [options]
|
||||
pit edit <ref>... [options]
|
||||
pit tag <id>... [options]
|
||||
pit update-details <id> [--file=<path>] [options]
|
||||
pit untag <id>... [options]
|
||||
pit reorder <state> [options]
|
||||
pit delegate <id> <delegated-to> [options]
|
||||
@@ -247,4 +248,4 @@ Issue Properties:
|
||||
|
||||
If present, expected to be a comma-delimited list of text tags. The -g
|
||||
option is a short-hand for '-p tags:<tags-value>'.
|
||||
"""
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user