@control-c-io/myslack
v2.4.0
Published
after extracting the interaction messages sent from slack buttons via the `ExtractMessage` function json file can be used to assess and send back message.
Downloads
59
Readme
Extracting format
after extracting the intercation messages sent from slack buttons via the ExtractMessage
function json file can be used to assess and send back message.
Sample format of json after extraction:
{
"type": "interactive_message",
"actions": [
{
"name": "RollbackUndo",
"type": "button",
"value": "RollbackUndo"
}
],
"callback_id": "rollback",
"team": {
"id": "TA0000FEV",
"domain": "snswworkspace"
},
"channel": {
"id": "GHXK32E2K",
"name": "privategroup"
},
"user": {
"id": "U0000000G",
"name": "arash.hosseini"
},
"action_ts": "1574037690.937450",
"message_ts": "1573885073.002500",
"attachment_id": "3",
"token": "Fi00000000000000000000fb",
"is_app_unfurl": false,
"original_message": {
"type": "message",
"subtype": "bot_message",
"text": "",
"ts": "1573885073.002500",
"bot_id": "BPSBXLHNX",
"attachments": [
{
"fallback": "This is placeholder for gitalbci pipline message",
"pretext": ":hole::deer: Gitlabci Pipeline #44831",
"title": ":back: digitallicense deployment rolling back",
"footer": "Check failed -> Rolledback",
"id": 1,
"title_link": "https://gitlab.service.nsw.gov.au/dlp/digitallicense/pipelines",
"ts": 1573885072,
"color": "FF1515",
"fields": [
{
"title": "Environment",
"value": "SIT",
"short": false
},
{
"title": "Commit Hash (Rolledback to)",
"value": "\"3a8cd6ff9f44cea69e09a8fbbbe597d748096bb3\"",
"short": false
}
]
},
{
"id": 2,
"actions": [
{
"id": "1",
"text": "Logs",
"type": "button",
"style": "",
"url": "https://gitlab.service.nsw.gov.au/dlp/digitallicense/-/jobs/351887"
}
],
"fallback": "[no preview available]"
},
{
"callback_id": "rollback",
"fallback": "If you could read this message, you'd be able to undo this rollback.",
"text": ":arrow_right: Force Deployment",
"id": 3,
"color": "3AA3E3",
"actions": [
{
"id": "2",
"name": "RollbackUndo",
"text": "Undo Rollback",
"type": "button",
"value": "RollbackUndo",
"style": "danger",
"confirm": {
"text": "You are making the deployment while not all API healthchecks passed?",
"title": "Are you sure?",
"ok_text": "Yes",
"dismiss_text": "No"
}
}
]
}
]
},
"response_url": "https://hooks.slack.com/actions/TA0000FEV/820000000007/DSO00000000000000000000K",
"trigger_id": "838059954592.345599865505.48392724e23f1c3f73dc1c9c9591d649"
}