根据the documentation,当使用推送Webhook时,我应该能够访问有关推送的信息,但是我遇到了问题。
我正在服务器上使用https://github.com/adnanh/webhook来监听webhook事件。 我可以成功使用该钩子,但是在响应中,我只能访问actor.display_name。
查看示例响应,我应该能够执行以下操作:
push.changes[0].new.target.hash
push.changes[0].new.target.message
push.changes[0].new.target.date
push.changes[0].links.diff
尽管当我尝试访问push.changes [0]时,它为空。 push.changes不为空,并且在检查控制台/日志时,我收到了我不熟悉的回复。样本:
commits:[map
[type:commit
summary:map[
raw:Testing Webhook
markup:markdown
HTML:<p>Testing Webhook</p>
type:rendered
]
parents:[map[
我是否假设webhook工具在输出响应之前对其进行了转换?如果我可以美化/格式化输出,则可能更容易解密。
任何朝正确方向的推动都是很好的。