Skip to content

Commit

Permalink
format string for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
loddit committed Aug 16, 2015
1 parent d035a2d commit 7f3bb5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions legilimens.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ getClosedPullRequestsAfter = (time) ->
else
pullRequests = JSON.parse(body).filter (pullRequest) ->
new Date(pullRequest.merged_at) > time
printPullRequestsReport(pullRequests)
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 lastedReleaseTime
console.log "Last release time is #{lastedReleaseTime.toLocaleTimeString()} #{lastedReleaseTime.toLocaleDateString()}"
resolve(lastedReleaseTime)

printPullRequestsReport = (pullRequests) ->
Expand Down

0 comments on commit 7f3bb5e

Please sign in to comment.