Created
April 19, 2019 08:03
-
-
Save iaindooley/6f770088101f269bc33f35c97aea73ce to your computer and use it in GitHub Desktop.
Notify with attachments
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 notifyWithAttachments(notification) | |
{ | |
var card = new Notification(notification).addedCard("Internal review"); | |
try | |
{ | |
card.postComment("@board ready for review. Here are the attachments\n\n"+card.attachments().find(function(att) | |
{ | |
return att.link(); | |
}).asArray().join("\n")); | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
card.postComment("@board card ready for review, no attachments present!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment