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