migliorata lettura dati
This commit is contained in:
parent
dd92b952a6
commit
3729e8e87e
@ -3,6 +3,12 @@
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.router.post '/hubot/githubhook/:room', (req, res) ->
|
||||
res.end 200
|
||||
res.send 200
|
||||
console.log req.body
|
||||
robot.send req.params.room, JSON.stringify req.body
|
||||
if req.body.ref is 'refs/head/master'
|
||||
s = 'Sono stato aggiornato!\n'
|
||||
cm = req.body.commits.map (c) ->
|
||||
[c.committer.username,c.message].join ' -> '
|
||||
commits = cm.join '\n'
|
||||
robot.send req.params.room, s+commits
|
||||
|
Loading…
Reference in New Issue
Block a user