Support for syncing all properties (including context) to Probatem's Virtual Status Board.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "4.29.1"
|
||||
version = "4.29.2"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Personal issue tracker."
|
||||
license = "MIT"
|
||||
@@ -27,4 +27,4 @@ requires @[
|
||||
]
|
||||
|
||||
task updateVersion, "Update the version of this package.":
|
||||
exec "update_nim_package_version pit 'src/pit/cliconstants.nim'"
|
||||
exec "update_nim_package_version pit 'src/pit/cliconstants.nim'"
|
@@ -1,4 +1,4 @@
|
||||
const PIT_VERSION* = "4.29.1"
|
||||
const PIT_VERSION* = "4.29.2"
|
||||
|
||||
const USAGE* = """Usage:
|
||||
pit ( new | add) <summary> [<state>] [options]
|
||||
|
@@ -19,9 +19,11 @@ type
|
||||
lastUpdatedAt*: DateTime
|
||||
archivedAt*: Option[DateTime]
|
||||
tags*: seq[string]
|
||||
context*: Option[string]
|
||||
parent*: Option[string]
|
||||
priority*: Option[string]
|
||||
project*: Option[string]
|
||||
properties*: JsonNode
|
||||
milestone*: Option[string]
|
||||
hideUntil*: Option[DateTime]
|
||||
|
||||
@@ -33,7 +35,7 @@ proc fromJsonHook(dt: var DateTime, n: JsonNode): void =
|
||||
|
||||
|
||||
#func `%`*(p: Project): JsonNode = toJson(p)
|
||||
func `%`*(t: ServerTask): JsonNode = toJson(t)
|
||||
proc `%`*(t: ServerTask): JsonNode = toJson(t)
|
||||
|
||||
|
||||
proc toServerTask(i: Issue): ServerTask =
|
||||
@@ -43,6 +45,12 @@ proc toServerTask(i: Issue): ServerTask =
|
||||
details: i.details,
|
||||
state: $i.state,
|
||||
tags: i.tags,
|
||||
properties: %i.properties,
|
||||
|
||||
context:
|
||||
if i.hasProp("context"): some(i["context"])
|
||||
else: none[string](),
|
||||
|
||||
lastUpdatedAt:
|
||||
if i.hasProp("last-updated"): parseIso8601(i["last-updated"])
|
||||
else: now(),
|
||||
@@ -80,7 +88,7 @@ proc initSyncContext*(pit: PitConfig, syncConfig: JsonNode): PbmVsbSyncContext =
|
||||
|
||||
proc fetchServerTasks*(ctx: PbmVsbSyncContext): seq[ServerTask] =
|
||||
result = newSeq[ServerTask]()
|
||||
let url = ctx.apiBaseUrl & "/tasks"
|
||||
let url = ctx.apiBaseUrl & "/tasks?context=" & ctx.issueContext
|
||||
|
||||
debug "Fetching tasks from server:\n\t" & url
|
||||
let resp = ctx.http.get(url)
|
||||
|
Reference in New Issue
Block a user