Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active March 26, 2019 04:32
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/be06a9a2131288d9472d0fe5bbabbc0d to your computer and use it in GitHub Desktop.
Save iaindooley/be06a9a2131288d9472d0fe5bbabbc0d to your computer and use it in GitHub Desktop.
Unanswered comments
function unansweredComments(board,signature,original_time)
{
new Board(board).cards().each(function(card)
{
var most_recent = card.comments().first();
//only proceed if the most recent comment was by me, more than 8 hours ago
if((most_recent.member() == "myusername") && (most_recent.when() < Trellinator.now().minusHours(8)))
{
//only proceed if the comment mentioned members other than me
most_recent.mentionedMembers().find(function(mem)
{
return (mem.name() != "myusername") ? mem:false;
}).first();
card.postComment("@myusername no reply received");
}
});
ExecutionQueue.push("unansweredComments",board,signature,original_time.addHours(8));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment