我最近为irc安装了一个hubot,运行得很好。我正在尝试添加this script.
然而,我并不完全理解设置说明。设置说明显示为
curl -H "Authorization: token <your api token>" \
-d '{"name":"web","active":true,"events":["pull_request"],"config":{"url":"<this script url>","content_type":"json"}}' \
https://api.github.com/repos/<your user>/<your repo>/hooks我不明白"url":"<this script url>"指的是什么。有人知道吗?
如果有帮助的话,我会部署到heroku。
发布于 2014-01-18 23:58:37
为@MikeKusold的回答添加更多解释
curl命令用于创建github hook,因此它被设置为通知的接收方的钩子。
"config": {
"url": "http://example.com/webhook",
"content_type": "json"
}钩子是hubot插件,因此url路径是在that script中定义的,请参阅行
robot.router.post "/hubot/gh-pull-requests", (req, res) ->脚本中下面两行告诉您路径后的内容,它具有参数room & type
user.room = query.room if query.room
user.type = query.type if query.typeHubot自己定义端口号,它根据请求将路径路由到插件,在robot.coffee中检查这一部分,默认端口是Hubot
因此,URL如下所示
http://<your hubot sever>:8080/hubot/gh-pull-requests/?room=<room>&type=<type>实际上,您可以先使用curl命令直接对hubot进行测试。
发布于 2013-12-06 11:43:32
Add <HUBOT_URL>:<PORT>/hubot/gh-pull-requests?room=<room>[&type=<type>] url hook via API
这就是URL
https://stackoverflow.com/questions/18318485
复制相似问题