 pagerDutySubdomain   = process.env.HUBOT_PAGERDUTY_SUBDOMAIN
 pagerDutyBaseUrl     = "https://#{pagerDutySubdomain}.pagerduty.com/api/v1"
 pagerDutyApiKey      = process.env.HUBOT_PAGERDUTY_APIKEY
+pagerDutyScheduleId  = process.env.HUBOT_PAGERDUTY_SCHEDULE_ID
 
 module.exports = (robot) ->
   robot.respond /pager( me)?$/i, (msg) ->

    until: oneHour,
    overflow: 'true'
  }
  pagerDutyGet msg, "/schedules/#{process.env.HUBOT_PAGERDUTY_SCHEDULE_ID}/entries", query, (json) ->
    if json.entries and json.entries.length > 0
      cb(json.entries[0].user.name)


      }
      withCurrentOncall msg, (old_username) ->
        data = { 'override': override }
        pagerDutyPost msg, "/schedules/#{pagerDutyScheduleId}/overrides", data, (json) ->
          if json.override
            start = moment(json.override.start)
            end = moment(json.override.end)
