Last active
March 26, 2019 04:32
-
-
Save iaindooley/be06a9a2131288d9472d0fe5bbabbc0d to your computer and use it in GitHub Desktop.
Unanswered comments
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
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