1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

WTF-454 Fixes multi-list issue with Trello. Closes #454

This commit is contained in:
Chris Cummer 2019-05-15 10:35:22 -07:00
parent 7c1152ac1d
commit 6879695e89
2 changed files with 6 additions and 3 deletions

View File

@ -25,8 +25,10 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma
if err != nil {
return nil, err
}
searchResult.Total = searchResult.Total + len(cards)
cardArray := make([]TrelloCard, 0)
for _, card := range cards {
trelloCard := TrelloCard{
ID: card.ID,
@ -36,6 +38,7 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma
}
cardArray = append(cardArray, trelloCard)
}
searchResult.TrelloCards[listName] = cardArray
}

View File

@ -41,15 +41,15 @@ func mapifyList(ymlConfig *config.Config, globalConfig *config.Config) map[strin
// Single list
list, err := ymlConfig.String("list")
if err == nil {
lists[list] = ""
lists[list] = list
return lists
}
// Array of lists
listList := ymlConfig.UList("project")
listList := ymlConfig.UList("list")
for _, listName := range listList {
if list, ok := listName.(string); ok {
lists[list] = ""
lists[list] = list
}
}