Hubot's github-pull-request-notifier.coffee -
i got hubot setup irc , works fine. i'm trying add this script.
i'm not entirely understanding setup instructions however. setup instructions read
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
i don't understand "url":"<this script url>"
refers to. know?
i'm deploying heroku if helps.
add more explanation @mikekusold 's answer
the curl
command create github hook, therefore set hook receiver notification.
"config": { "url": "http://example.com/webhook", "content_type": "json" }
the hook hubot plugin, url path defined in that script, see line
robot.router.post "/hubot/gh-pull-requests", (req, res) ->
below 2 lines in scripts tell after path, has parameters room & type
user.room = query.room if query.room user.type = query.type if query.type
hubot define port number, route path plugin requested, check part in robot.coffee, default port 8080
therefore url below
http://<your hubot sever>:8080/hubot/gh-pull-requests/?room=<room>&type=<type>
actually can use curl
command test towards hubot directly first.
Comments
Post a Comment