From afd7e73629e9271a39351c3770589270f822c494 Mon Sep 17 00:00:00 2001 From: Corey Donohoe Date: Tue, 17 Jan 2017 16:48:31 -0800 Subject: [PATCH] remove heaps of deployment behavior --- package.json | 2 +- src/scripts/deploy.coffee | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 2a4224d..dd4a163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hubot-deploy", - "version": "0.13.27", + "version": "0.14.0.pre1", "author": "Corey Donohoe ", "description": "hubot script for GitHub Flow", "main": "index.coffee", diff --git a/src/scripts/deploy.coffee b/src/scripts/deploy.coffee index 3a48738..447f59d 100644 --- a/src/scripts/deploy.coffee +++ b/src/scripts/deploy.coffee @@ -27,21 +27,8 @@ defaultDeploymentEnvironment = () -> ########################################################################### module.exports = (robot) -> - ########################################################################### - # where can i deploy - # - # Displays the available environments for an application - robot.respond ///where\s+can\s+i\s+#{DeployPrefix}\s+([-_\.0-9a-z]+)///i, id: "hubot-deploy.wcid", (msg) -> - name = msg.match[1] - - try - deployment = new Deployment(name) - formatter = new Formatters.WhereFormatter(deployment) - - robot.emit "hubot_deploy_available_environments", msg, deployment, formatter - - catch err - robot.logger.info "Exploded looking for deployment locations: #{err}" + robot.respond /deploy/i, id: "h-deploy", (msg) -> + msg.reply "Try running /h deploy" ########################################################################### # deploys in @@ -76,7 +63,7 @@ module.exports = (robot) -> if robot.adapterName is "hipchat" if msg.envelope.user.reply_to? deployment.room = msg.envelope.user.reply_to - + if robot.adapterName is "slack" deployment.user = user.name deployment.room = robot.adapter.client.rtm.dataStore.getChannelGroupOrDMById(msg.message.user.room).name