Created
October 5, 2020 22:54
-
-
Save iaindooley/cc3e0e2dfaba16be576407fd013101f5 to your computer and use it in GitHub Desktop.
Standardise labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var labels = ["one","two","three"]; | |
new Trellinator().boards().each(function(board) | |
{ | |
var target_list = board.findOrCreateList("TEMP"); | |
for(var i = 0;i < labels.length;i++) | |
{ | |
Card.create(target_list,"TEMP").addLabel(labels[i]).archive(); | |
} | |
board.labels().each(function(label) | |
{ | |
if(labels.indexOf(label.name()) == -1) | |
{ | |
label.del(); | |
} | |
}); | |
target_list.archive(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment