2 Commits
0.2.0 ... 0.2.2

Author SHA1 Message Date
208bdab1e4 Don't worry about missing Trello cards if the issue is completed.
This is a normal case when Trello lists or cards are archived.
2023-12-15 22:16:28 -06:00
2080be5537 Ignore completed issues that were never on a Trello board. 2023-11-16 17:32:08 -06:00
3 changed files with 14 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# Package
version = "0.2.0"
version = "0.2.2"
author = "Jonathan Bernard"
description = "Synchronization tool between JDB pit and Trello."
license = "MIT"

View File

@ -126,10 +126,13 @@ proc syncContext(
let foundCard = cards --> find(it.card.id == cardId)
if foundCard.isNone:
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.")
## 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.")
else:
let c = foundCard.get
@ -209,6 +212,10 @@ proc syncContext(
for lentIssue in unmatchedIssues:
let issue = lentIssue
# Don't worry about creating new cards for issues that are done.
if issue.state == Done: continue
let list = board.lists[listCategoryForIssueState(issue.state)][0]
let newCard = TrelloCard(
name: issue.summary,

View File

@ -1,4 +1,4 @@
const PIT2TRELLO_VERSION* = "0.2.0"
const PIT2TRELLO_VERSION* = "0.2.2"
const USAGE* = """
Usage:
@ -15,4 +15,4 @@ Options:
--debug Enable verbose debug logging.
--help Print this help and usage information.
"""
"""