From 28c509a27efc49df4c66ddc1f30a3766dc4ef5ee Mon Sep 17 00:00:00 2001 From: thalles Date: Fri, 30 Jul 2021 09:19:46 -0300 Subject: [PATCH] debug Signed-off-by: thalles --- licence.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/licence.js b/licence.js index 8fe2de8..ac0f754 100644 --- a/licence.js +++ b/licence.js @@ -21,6 +21,7 @@ const util = require("util"); const chalk = require("chalk"); function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) { let requiredDate = '' + console.log(file.year) if (file.status === 'modified'){ if(file.year < new Date().getFullYear()) { requiredDate = `Copyright ${startDateLicense, new Date().getFullYear()}` @@ -109,7 +110,9 @@ async function getCreationYear(file, config) { const commitsDates = response.data.map( data => new Date(data.commit.author.date) ) + console.log(commitsDates) const creationDate = Math.min.apply(null, commitsDates) + console.log(creationDate) return new Date(creationDate).getFullYear() }