从 Fossil TH1 将票证 Updates/Commits 发布到 Webhook

Publish Ticket Updates/Commits to Webhook from Fossil TH1

我目前正在尝试使用我的 Fossil Repo running 2.6

设置 Discord(或类似 Slack 的)webhook

我正在关注此文档:

这是我在原始 TH1 请求中尝试 运行 的示例:

http -asynchronous https://discordapp.com/api/webhooks/443395012672094208/(redacted) {content: 'hello there'}

我希望它看起来像这样(我在 Postman 中单独做了这个)

但是我没有得到任何回应,而且在 Fossil 上没有太多的调试空间。我不确定如何格式化有效负载。我也试过"stringifying"。查看 HTTP 响应的同步请求尚未实现,因此我无法取消标记。

我的 TH1 Regexp 设置如下(它不再抛出关于不可接受的 URI 的错误):

这是一个猜测:你可能想要

http -asynchronous $url {{"content":"hello there"}}

双括号没有错:外括号是 TH1 的引号,里面的内容是一个 JSON 对象(我假设你是要 POST 一些 JSON 数据到 discord webhook)。

您可能想要 link 到 discord webhook REST API 以查看您应该发送什么负载。

虽然我很感激我从这里和 Fossil SCM forums, I found the best way to get around this was to send updates to a "middleware" service 的评论中得到的反馈,但他们通过命令行获取最后更新的票证并解析票证历史记录并将该信息发送到 webhook。我想看看有没有其他人解决过这个问题。