Skip to content

Commit

Permalink
Merge pull request #27 from thalleslmF/pr-201
Browse files Browse the repository at this point in the history
debug
  • Loading branch information
thalleslmF authored Jul 30, 2021
2 parents 5db71c3 + 28c509a commit 850553f
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 850553f

Please sign in to comment.