Add date and time to contribution details
This commit is contained in:
parent
cbefc1a2b7
commit
a5282875cc
7
index.js
7
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
|
||||
|
Reference in New Issue
Block a user