 
       return payload
 
-  else
-
-    branch_action = (resp, action_name, action_desc, cached_vars) ->
-      msg = "#{cached_vars.actor} *#{action_name}* pull request \"#{cached_vars.title},\" #{action_desc} `#{cached_vars.source_branch}` and `#{cached_vars.destination_branch}` into a `#{cached_vars.repo_name}` super branch"
-      msg += if resp.reason isnt '' then ":\n\"#{resp.pullrequest.reason}\"" else "."
-
-      return msg

encourageMe = ->
  ENCOURAGEMENTS[Math.floor(Math.random() * ENCOURAGEMENTS.length)]

module.exports = (robot) ->
  robot.router.post '/hubot/bitbucket-pr', (req, res) ->
    resp = req.body


    # For hubot adapters that are not Slack
    else
      event = new PullRequestEvent(robot, resp, type)
      msg = event.getMessage()
      robot.messageRoom room, msg

    # Close response
