diff --git a/index.js b/index.js index 85fe942..66aa48a 100644 --- a/index.js +++ b/index.js @@ -109,8 +109,9 @@ async function initializeKredits () { async function generateContributionData(reviews, Contributor) { const contributors = await Contributor.all(); - const contributionData = {}; + const now = (new Date()).toISOString().split('.')[0]+"Z"; + [date, time] = now.split('T'); function addContributionDataForPlatform(platform) { for (const [username, platformReviews] of Object.entries(reviews[platform])) { @@ -135,8 +136,10 @@ async function generateContributionData(reviews, Contributor) { contributionData[contributor.name] = { contributorId: contributor.id, contributorIpfsHash: contributor.ipfsHash, - kind: 'dev', + date, + time, amount: kreditsAmount, + kind: 'dev', description: 'PR reviews', details: { 'pullRequests': urls