Skip to content

Commit

Permalink
Revert "handleErrors must be registered on github module, not instanc…
Browse files Browse the repository at this point in the history
…e of client. (#20)"

This reverts commit 098b118.
  • Loading branch information
vlymar committed Jun 23, 2017
1 parent 3dfcda3 commit ef228e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/github-deploy.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ module.exports = (robot) ->
robot.brain.data.deploys ||= []
github = require("githubot")

github.handleErrors (response) ->
msg.send "An error occurred: #{response.statusCode} | #{response.error} | #{response.body}"

addDeploy = (repoName) ->
robot.brain.data.deploys.push(repoName)
robot.brain.data.deploys = _.uniq(robot.brain.data.deploys)
Expand Down Expand Up @@ -53,6 +50,9 @@ module.exports = (robot) ->

client = github(robot, options)

client.handleErrors (response) ->
msg.send "An error occurred: #{response.error}"

client.post "repos/dobtco/#{repoName}/pulls",
title: 'Deploy to production'
head: 'master'
Expand Down

0 comments on commit ef228e0

Please sign in to comment.