     console.log "#{index}. #{pullRequest.title} by @#{pullRequest.user.login}"
     index++
 
-getLastedReleaseTime.then getClosedPullRequestsAfter
+getLastedReleaseTime.then (lastedReleaseTime) ->
+  getClosedPullRequestsAfter(lastedReleaseTime)

      password: password
  , callback

getClosedPullRequestsAfter = (time) ->
  callGithubAPI (repoUrl + RECENT_CLOSED_PR_PATH), (error, response, body) ->
    if (!error and response.statusCode isnt 200)
      console.log error, body
    else
      pullRequests = JSON.parse(body).filter (pullRequest) ->
        new Date(pullRequest.merged_at) > time
      if pullRequests.length
        printPullRequestsReport(pullRequests)
      else
        console.log 'No new pull requests be merged.'

getLastedReleaseTime = new Promise (resolve, reject) ->
  callGithubAPI (repoUrl + LATEST_RELEASE_PATH),  (error, response, body) ->
    if (!error and response.statusCode isnt 200)
      reject error
    else
      lastedReleaseTime = new Date(JSON.parse(body).created_at)
      console.log "Last release time is #{lastedReleaseTime.toLocaleTimeString()} #{lastedReleaseTime.toLocaleDateString()}"
      resolve(lastedReleaseTime)

printPullRequestsReport = (pullRequests) ->
  index = 1


repoUrl = "#{GITHUB_REPO_API_ROOT}#{repoOwner}/#{repoName}"

callGithubAPI = ({url, callback}) ->
  request
    url: url
    headers:
