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:
parent
7c1152ac1d
commit
6879695e89
@ -25,8 +25,10 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
searchResult.Total = searchResult.Total + len(cards)
|
searchResult.Total = searchResult.Total + len(cards)
|
||||||
cardArray := make([]TrelloCard, 0)
|
cardArray := make([]TrelloCard, 0)
|
||||||
|
|
||||||
for _, card := range cards {
|
for _, card := range cards {
|
||||||
trelloCard := TrelloCard{
|
trelloCard := TrelloCard{
|
||||||
ID: card.ID,
|
ID: card.ID,
|
||||||
@ -36,6 +38,7 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma
|
|||||||
}
|
}
|
||||||
cardArray = append(cardArray, trelloCard)
|
cardArray = append(cardArray, trelloCard)
|
||||||
}
|
}
|
||||||
|
|
||||||
searchResult.TrelloCards[listName] = cardArray
|
searchResult.TrelloCards[listName] = cardArray
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,15 +41,15 @@ func mapifyList(ymlConfig *config.Config, globalConfig *config.Config) map[strin
|
|||||||
// Single list
|
// Single list
|
||||||
list, err := ymlConfig.String("list")
|
list, err := ymlConfig.String("list")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
lists[list] = ""
|
lists[list] = list
|
||||||
return lists
|
return lists
|
||||||
}
|
}
|
||||||
|
|
||||||
// Array of lists
|
// Array of lists
|
||||||
listList := ymlConfig.UList("project")
|
listList := ymlConfig.UList("list")
|
||||||
for _, listName := range listList {
|
for _, listName := range listList {
|
||||||
if list, ok := listName.(string); ok {
|
if list, ok := listName.(string); ok {
|
||||||
lists[list] = ""
|
lists[list] = list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user