Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
a28f1540c4 | |||
f8e39d60f6 | |||
208bdab1e4 | |||
2080be5537 |
1
.tool-versions
Normal file
1
.tool-versions
Normal file
@ -0,0 +1 @@
|
|||||||
|
nim 2.2.0
|
@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.2.0"
|
version = "0.2.3"
|
||||||
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,11 +19,11 @@ requires @[
|
|||||||
|
|
||||||
# Dependencies from git.jdb-software.com/jdb/nim-packages
|
# Dependencies from git.jdb-software.com/jdb/nim-packages
|
||||||
requires @[
|
requires @[
|
||||||
"cliutils >= 0.8.1",
|
"cliutils >= 0.9.1",
|
||||||
"pit >= 4.23.3",
|
"pit >= 4.26.0",
|
||||||
"timeutils",
|
"timeutils",
|
||||||
"update_nim_package_version"
|
"update_nim_package_version"
|
||||||
]
|
]
|
||||||
|
|
||||||
task updateVersion, "Update the version of this package.":
|
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'"
|
||||||
|
@ -126,10 +126,13 @@ proc syncContext(
|
|||||||
let foundCard = cards --> find(it.card.id == cardId)
|
let foundCard = cards --> find(it.card.id == cardId)
|
||||||
|
|
||||||
if foundCard.isNone:
|
if foundCard.isNone:
|
||||||
raise newException(Exception,
|
## Ignore issues that are completed (may be archived in Trello)
|
||||||
"pit issue " & ($i.id)[0..6] & " references a Trello card with id " &
|
if i.state == Done: unmatchedIssueIds.excl($i.id)
|
||||||
cardId & " but that card is not any of the lists of the " &
|
else:
|
||||||
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:
|
else:
|
||||||
let c = foundCard.get
|
let c = foundCard.get
|
||||||
@ -189,6 +192,11 @@ 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,
|
||||||
@ -202,13 +210,16 @@ 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
|
||||||
|
|
||||||
for lentIssue in unmatchedIssues:
|
for lentIssue in unmatchedIssues:
|
||||||
let issue = lentIssue
|
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 list = board.lists[listCategoryForIssueState(issue.state)][0]
|
||||||
let newCard = TrelloCard(
|
let newCard = TrelloCard(
|
||||||
name: issue.summary,
|
name: issue.summary,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const PIT2TRELLO_VERSION* = "0.2.0"
|
const PIT2TRELLO_VERSION* = "0.2.3"
|
||||||
|
|
||||||
const USAGE* = """
|
const USAGE* = """
|
||||||
Usage:
|
Usage:
|
||||||
@ -15,4 +15,4 @@ Options:
|
|||||||
--debug Enable verbose debug logging.
|
--debug Enable verbose debug logging.
|
||||||
|
|
||||||
--help Print this help and usage information.
|
--help Print this help and usage information.
|
||||||
"""
|
"""
|
Loading…
x
Reference in New Issue
Block a user