Skip to content

Commit

Permalink
Try to retrieve date from the commit information in updateContentGitH…
Browse files Browse the repository at this point in the history
…ubActionsGitHubPages.mjs
  • Loading branch information
sagarpatel288 committed Oct 9, 2024
1 parent d55fb7e commit a19b98a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions updateContentGitHubActionsGitHubPages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ import fetch from 'node-fetch';
throw new Error(`Sagar: Failed to fetch commit details for ${filePath}`);
}
const commits = await commitInfo.json();
console.log("Sagar: fileDetails: ", commits)
const createdDate = commits[commits.length - 1].commit.author.date;
console.log("Sagar: createdDate: ", createdDate)
const modifiedDate = commits[0].commit.author.date;
console.log("Sagar: fileDetails", commits)
kotlinFiles.push({
console.log("Sagar: modifiedDate: ", modifiedDate)
kotlinFiles.push({
name: item.name,
url: item.html_url,
createdDate: createdDate,
Expand Down

0 comments on commit a19b98a

Please sign in to comment.