feat(profile): Add Top Contributor badge feature (#38348)

Co-authored-by: Twaha Rahman <39026437+Twaha-Rahman@users.noreply.github.com>
Co-authored-by: Twaha Rahman <mahi6703890@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
This commit is contained in:
Ashraf Nazar
2020-11-16 08:19:45 +00:00
committed by GitHub
parent 53f40b7f12
commit 9831df18e0
8 changed files with 59 additions and 11 deletions

View File

@ -4,6 +4,8 @@ const MongoClient = require('mongodb').MongoClient;
const ObjectId = require('mongodb').ObjectID;
const debug = require('debug');
const envVariables = process.argv;
const log = debug('fcc:tools:seedLocalAuthUser');
const { MONGOHQ_URL } = process.env;
@ -73,7 +75,9 @@ MongoClient.connect(MONGOHQ_URL, { useNewUrlParser: true }, function(
isMachineLearningPyCertV7: false,
completedChallenges: [],
portfolio: [],
yearsTopContributor: [],
yearsTopContributor: envVariables.includes('--top-contributor')
? ['2017', '2018', '2019']
: [],
rand: 0.6126749173148205,
theme: 'default',
profileUI: {
@ -91,7 +95,7 @@ MongoClient.connect(MONGOHQ_URL, { useNewUrlParser: true }, function(
badges: {
coreTeam: []
},
isDonating: false,
isDonating: envVariables.includes('--donor'),
emailAuthLinkTTL: null,
emailVerifyTTL: null
});