From 4bd370ee57c4337e4cfa51ffdc37bb5ea4c6ac45 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 27 Feb 2017 15:35:53 +0100 Subject: [PATCH] update github repo information --- scripts/github.coffee | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/github.coffee b/scripts/github.coffee index 73c1b06..a602300 100644 --- a/scripts/github.coffee +++ b/scripts/github.coffee @@ -5,10 +5,11 @@ # "github": "0.2.4" # # Commands: -# asjon mostra le issue - mostra le issue aperte su fazo96/asjon +# asjon mostra le issue - mostra le issue aperte su rnhmjoj/asjon # # Author: # Enrico Fasoli (fazo96) +# Michele Guerini Rocco (rnhmjoj) GitHubAPI = require 'github' github = new GitHubAPI version: '3.0.0' @@ -16,19 +17,19 @@ github = new GitHubAPI version: '3.0.0' module.exports = (robot) -> githubhook = (req, res) -> res.send 200 - dest = name: req.params.name, room: req.params.room.replace(':','#') + dest = name: req.params.name, room: id: req.params.room robot.emit 'githubhook', req.body, req.params - s = 'Branch '+req.body.ref+' aggiornato!\n' + s = "branch #{req.body.ref} aggiornato!\n" cm = req.body.commits.map (c) -> - [c.committer.username,c.message].join ' -> ' - robot.send dest, s+cm.join('\n') + [c.committer.username, c.message].join ' -> ' + robot.send dest, s + cm.join '\n' unless process.env.TESTING_ASJON # Disabilito http route durante i test robot.router.post '/hubot/githubhook/:room/:name?', githubhook robot.respond /(?:(?:mostra(?:mi)?|fammi vedere) )?(?:le )?issue(?:s)?/i, (res) -> - msg = state: 'open', user: 'fazo96', repo: 'asjon', sort: 'updated' + msg = state: 'open', user: 'rnhmjoj', repo: 'asjon', sort: 'updated' res.send 'controllo issues...' github.issues.repoIssues msg, (err,data) -> if err then return res.send err @@ -40,7 +41,7 @@ module.exports = (robot) -> res.send r.join '\n' robot.respond /linkami (?:la )?issue (?:(?:n(?:°)?(?: )?)|numero )?(\d+)/i, (res) -> - base = 'http://github.com/fazo96/asjon/issues/' + base = 'http://github.com/rnhmjoj/asjon/issues/' res.send base+res.match[1] robot.respond /linkami (?:la )?repo (\w+\/\w+)/i, (res) ->