Compare commits
1 Commits
main
...
ignore-old
Author | SHA1 | Date | |
---|---|---|---|
c6adf92564 |
@ -1 +0,0 @@
|
||||
nim 2.2.0
|
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "0.2.3"
|
||||
version = "0.2.1"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Synchronization tool between JDB pit and Trello."
|
||||
license = "MIT"
|
||||
@ -19,11 +19,11 @@ requires @[
|
||||
|
||||
# Dependencies from git.jdb-software.com/jdb/nim-packages
|
||||
requires @[
|
||||
"cliutils >= 0.9.1",
|
||||
"pit >= 4.26.0",
|
||||
"cliutils >= 0.8.1",
|
||||
"pit >= 4.23.3",
|
||||
"timeutils",
|
||||
"update_nim_package_version"
|
||||
]
|
||||
|
||||
task updateVersion, "Update the version of this package.":
|
||||
exec "update_nim_package_version pit2trello 'src/pit2trellopkg/cliconstants.nim'"
|
||||
exec "update_nim_package_version pit2trello 'src/pit2trellopkg/cliconstants.nim'"
|
@ -102,8 +102,10 @@ proc syncContext(
|
||||
|
||||
let board = s.boards[ctx.boardId]
|
||||
|
||||
let issues = s.issues.find(
|
||||
propsFilter(newTable([("context", ctx.context)])))
|
||||
var issueFilter = initFilter()
|
||||
issueFilter.completedRange = some((now() - 60.days, now()))
|
||||
issueFilter.properties = newTable([("context", ctx.context)])
|
||||
let issues = s.issues.find(issueFilter)
|
||||
|
||||
let cards: seq[tuple[list: TrelloListSummary, card: TrelloCard]] =
|
||||
board.lists.pairs.toSeq -->
|
||||
@ -126,13 +128,10 @@ proc syncContext(
|
||||
let foundCard = cards --> find(it.card.id == cardId)
|
||||
|
||||
if foundCard.isNone:
|
||||
## Ignore issues that are completed (may be archived in Trello)
|
||||
if i.state == Done: unmatchedIssueIds.excl($i.id)
|
||||
else:
|
||||
raise newException(Exception,
|
||||
"pit issue " & ($i.id)[0..6] & " references a Trello card with id " &
|
||||
cardId & " but that card is not any of the lists of the " &
|
||||
board.name & " board.")
|
||||
raise newException(Exception,
|
||||
"pit issue " & ($i.id)[0..6] & " references a Trello card with id " &
|
||||
cardId & " but that card is not any of the lists of the " &
|
||||
board.name & " board.")
|
||||
|
||||
else:
|
||||
let c = foundCard.get
|
||||
@ -192,11 +191,6 @@ proc syncContext(
|
||||
|
||||
for (list, lentCard) in unmatchedCards:
|
||||
let (list, card) = (list, lentCard)
|
||||
let issueState = issueStateForListCategory(list.category)
|
||||
|
||||
# Don't worry about creating new issues for cards that are done.
|
||||
if issueState == Done: continue
|
||||
|
||||
let issue = Issue(
|
||||
id: genUUID(),
|
||||
summary: card.name,
|
||||
@ -210,6 +204,7 @@ proc syncContext(
|
||||
filter(it.isSome).
|
||||
map(it.get))
|
||||
|
||||
let issueState = issueStateForListCategory(list.category)
|
||||
if not dryRun: s.pit.tasksDir.store(issue, issueState)
|
||||
info "pit created: " & formatSectionIssue(issue, width = 64) & " " &
|
||||
$issueState
|
||||
|
@ -1,4 +1,4 @@
|
||||
const PIT2TRELLO_VERSION* = "0.2.3"
|
||||
const PIT2TRELLO_VERSION* = "0.2.1"
|
||||
|
||||
const USAGE* = """
|
||||
Usage:
|
||||
|
Loading…
Reference in New Issue
Block a user