Skip to content

Commit

Permalink
Adds logging for #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfurrow committed Jan 7, 2018
1 parent 422341b commit 0134ddf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rules/new-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export const markRepoAsStale = wrap(
const api = danger.github.api
const sixMonthsAgo = Date.now() - 3600 * 24 * 30 * 6

console.log(`fetching for ${repoName}.`)
const repo = await api.repos.get({ repo: repoName, owner: "ashfurrow" })
console.log(`pushed_at: ${repo.pushed_at}`)
console.log(repo)
// `pushed_at` is the last time that any commit was made to any branch.
if (Date.parse(repo.pushed_at) < sixMonthsAgo) {
markdown(`
Expand Down

0 comments on commit 0134ddf

Please sign in to comment.