Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created October 5, 2020 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/cc3e0e2dfaba16be576407fd013101f5 to your computer and use it in GitHub Desktop.
Save iaindooley/cc3e0e2dfaba16be576407fd013101f5 to your computer and use it in GitHub Desktop.
Standardise labels
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