Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: thalles <lopthalles@gmail.com>
  • Loading branch information
thalleslmF committed Jul 30, 2021
1 parent 1f232cc commit 28c509a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions licence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit 28c509a

Please sign in to comment.