   """
   sendToChat robot, { room, message }
 
-onIssueUpdated = (robot, space, w, requests) ->
-  projectKey = w.project.projectKey
-  project = space.getProject projectKey
-  unless project?
-    robot.logger.warning 'hubot-fgb: unknown project key: ' + projectKey
-    return
+onIssueUpdated = (robot, space, project, w, requests) ->
   issueKey = "#{project.getKey()}-#{w.content.key_id}"
   issueUrl = "https://#{space.getId()}.backlog.jp/view/#{issueKey}"
   summary = w.content.summary

  e.room = room if room?
  robot.send e, m

onIssueCreated = (robot, space, w) ->
  projectKey = w.project.projectKey
  project = space.getProject projectKey
  unless project?
    robot.logger.warning 'hubot-fgb: unknown project key: ' + projectKey
    return
  issueKey = "#{project.getKey()}-#{w.content.key_id}"
  issueUrl = "https://#{space.getId()}.backlog.jp/view/#{issueKey}"
  summary = w.content.summary


  robot.router.post '/hubot/fgb/backlog/webhook', (req, res) ->
    webhook = req.body
    if webhook.type in [1, 2, 3]
      projectKey = w.project.projectKey
      project = space.getProject projectKey
      unless project?
        robot.logger.warning 'hubot-fgb: unknown project key: ' + projectKey
        return
      switch webhook.type
        when 1 then onIssueCreated robot, space, project, webhook
        when 2 then onIssueUpdated robot, space, project, webhook, requests
        when 3 then onIssueCommented robot, space, project, webhook
    else
      return if webhook.type <= 17 # max webhook.type
      robot.logger.warning "hubot-fgb: unknown webhook type: #{webhook.type}"
