Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created March 11, 2020 00:58
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/fe71f9c6bc0e8850138889a76adda7a9 to your computer and use it in GitHub Desktop.
Save iaindooley/fe71f9c6bc0e8850138889a76adda7a9 to your computer and use it in GitHub Desktop.
Synch labels
function synchLabels(notification)
{
var notif = new Notification(notification);
var added = notif.addedLabel();
if(notif.member().notTrellinator())
{
new Trellinator().boards().each(function(board)
{
try
{
var first = board.cards().first();
first.addLabel(added.name());
first.removeLabel(first.label(added.name()));
}
catch(e)
{
Notification.expectException(InvalidDataException,e);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment