     index++
 
 getLastedReleaseTime(getClosedPullRequestsAfter)
-
-

request = require('request')

GITHUB_API_ROOT = "https://api.github.com/repos/"
LATEST_RELEASE_PATH = "/releases/latest"
RECENT_CLOSED_PR_PATH = "/pulls?state=closed&sort=updated&direction=desc"


repoOwner = 'repo/owner'
repoName = 'reponame'

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

callGithubAPI = (url, callback = (error, response, body) -> {}) ->
  request
    url: url
    headers:
     'User-Agent': 'request'
    auth:
      user: username
      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
