Skip to content

Instantly share code, notes, and snippets.

View gist:1546fa0eef1d17ae141a082126934a36
var archived = new Notification(notification).archivedCard();
var append = [];
archived.board().customFields().each(function(cf)
{
append.push(cf.name()+": "+archived.customFieldValue(cf.name()));
});
archived.setDescription(
archived.description()+"\n____\n"+append.join("\n")
View gist:2ffce3d3089ec6580ad011181314e616
var added = new Notification(notification).addedLabel(/Common/i);
added.card().removeLabel(added.name());//REMOVE THE LABEL: STOP IT FROM RECURSIVELY COPYING
new Trellinator().boards().each(function(board()
{
if(board.id() != added.card().board().id())
{
try
{
added
View gist:7c7e319d9fc483de4a754809bed1dd0b
var notif = new Notification(notification);
var added = notif.addedChecklistItem();
if(!notif.member().notTrellinator())
throw new InvalidActionException("Ignore actions taken by the Bot user");
added
.checklist()
.card()
.board()
View gist:4f09531c608547f9efdafea163d89ae7
var sticker = new Notification(notification).addedSticker();
sticker.card().addLabel(sticker.name());
View gist:466635b380564a34347596b5d618f788
var board_name = "YOUR BOARD NAME";//update this to the name of your board
/// DO NOT EDIT BELOW THIS LINE ///
new Trellinator().board(board_name).lists().each(function(list)
{
list.cards().each(function(card)
{
new IterableCollection(TrelloApi.get("cards/"+card.id()+"/stickers")).each(function(sticker)
{
View gist:0c8f97115016e8c0b8137944a1b4fda9
var notif = new Notification(notification);
if(!notif.member().notTrellinator())
throw new InvalidActionException("Don't react to my own changes");
var changed = notif.changedCardDescription();
changed.setDescription(
changed.description().replace(/http(s?):\/\/([^\/\b]+?)(\/?)(?=\s|$)/ig,"`http$1://$2$3`")
);
View gist:096c82740f3769bd29a89633293e40a1
var bot = new Trellinator();
var target = bot.board("Archive Board");
Trellinator.searchCardsInBoards(
bot.board("From Board"),
"is:archived"
).each(function(card)
{
card.unArchive().moveToList(target.findOrCreateList(card.currentList().name()));
});
@iaindooley
iaindooley / gist:42e2b377698ea1669262eac3353fdfd2
Created May 17, 2021
createLinkedMemberCardWhenAssignedToChecklistItem
View gist:42e2b377698ea1669262eac3353fdfd2
var added = new Notification(notification).addedMemberToChecklistItem();
Card.create(
new Trellinator().board(added.name()).findOrCreateList(/Inbox/i),
added.item().name()
)
.attachLink(added.item().checklist().card().link())
.setDue(added.item().due());
View gist:15d82b4344d83d5f64885563f275034d
var added = new Notification(notification).addedLabel(/Recover Description/i);
var json = ___request("get","https://trello.com/1/cards/"+added.card().shortId()+"/actions?filter=updateCard:desc");
added.setDescription(
json[0].data.old.desc
);
@iaindooley
iaindooley / gist:70a6c61bd9004cd7e351930c4f41319e
Created May 17, 2021
notifyMemberWhenAssignedToChecklistItem
View gist:70a6c61bd9004cd7e351930c4f41319e
var member = new Notification(notification).addedMemberToChecklistItem();
member.item().checklist().card().postComment("@"+member.name()+" You have been assigned to item: "+member.item().name());