Send notifications to my phone from issue reporter
This commit is contained in:
20
issue-reports/notifications.js
Normal file
20
issue-reports/notifications.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const statusCode = msg.statusCode
|
||||
const issueNumber = msg.payload.number
|
||||
const issueTitle = msg.payload.title
|
||||
const url = msg.payload.html_url
|
||||
const user = msg.user
|
||||
|
||||
let notification = {
|
||||
"title": "Issue Submitted",
|
||||
"message": `${user.firstName} ${user.lastName} submitted a new issue: #${issueNumber} - ${issueTitle}`,
|
||||
"actions": [
|
||||
{
|
||||
"action": "URI",
|
||||
"uri": url,
|
||||
"title": "View Issue"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
node.send(notification)
|
||||
node.status({fill:'green',shape:'dot',text:`Issue #${issueNumber} notification sent`})
|
||||
Reference in New Issue
Block a user