我想在闲暇时收到有关我的heroku服务器进程(例如dyno restart等)的通知。我尝试实现heroku的webhook应用程序,但遇到“ missing_text_or_fallback_or_attachments”错误。
我传入的Slack的Webhook URL可以100%工作,因为我尝试使用该Webhook URL发送消息。
这是我的有效载荷
{
"action": "update",
"actor": {
"email": "pvbarredo@gmail.com",
"id": "05abb58b-178d-4d2a-9d02-a6e951b7badf"
},
"created_at": "2019-06-12T07:04:17.482868Z",
"data": {
"addon_plan_names": [
"jawsdb-maria:kitefin"
],
"app": {
"id": "dc0b5699-fb76-4509-98ca-810c40710cca",
"name": "opi-recognition"
},
"created_at": "2019-06-12T07:04:17Z",
"current": true,
"description": "Remove webhook_secret config vars",
"id": "f291cd03-2e81-47fd-a3f9-c8c8120a8d81",
"output_stream_url": null,
"pstable": {
"web": {
"command": "java -Dserver.port=$PORT -jar build/libs/recognition-0.0.1-SNAPSHOT.jar",
"slug": {
"id": "827f9c32-2417-427f-8d08-93dd7b07a84e"
}
}
},
"slug": {
"id": "827f9c32-2417-427f-8d08-93dd7b07a84e",
"commit": "de6c860652a207f6f0e78ef5723279b962924aef",
"commit_description": ""
},
"status": "succeeded",
"updated_at": "2019-06-12T07:04:17Z",
"user": {
"email": "pvbarredo@gmail.com",
"id": "05abb58b-178d-4d2a-9d02-a6e951b7badf"
},
"version": 25
},
"id": "8026b408-93de-4a7f-a0e8-94c1981b0f87",
"previous_data": {},
"published_at": "2019-06-12T07:04:17Z",
"resource": "release",
"sequence": null,
"updated_at": "2019-06-12T07:04:17.482875Z",
"version": "application/vnd.heroku+json; version=3",
"webhook_metadata": {
"attempt": {
"id": "39200100-cd08-4262-9a0b-34145e485118"
},
"delivery": {
"id": "dd755fcf-e166-4628-b6c4-de36a32a558e"
},
"event": {
"id": "8026b408-93de-4a7f-a0e8-94c1981b0f87",
"include": "api:release"
},
"webhook": {
"id": "92e7ef01-be4e-4218-b484-5e026d140f68"
}
}
}
我希望它应该能正常工作,因为我所做的只是挂上钩子,让heroku服务执行其任务。