29 lines
924 B
JavaScript
29 lines
924 B
JavaScript
require('dotenv').config()
|
|
const GiteaReviews = require('./lib/gitea-reviews');
|
|
const GithubReviews = require('./lib/github-reviews');
|
|
|
|
const kreditsAmounts = {
|
|
'kredits-1': 100,
|
|
'kredits-2': 300,
|
|
'kredits-3': 1000
|
|
};
|
|
|
|
// TODO get the dates from params or user input
|
|
const startDate = new Date('2020-11-01T00:00:00Z');
|
|
const endDate = new Date('2020-12-30T23:59:59Z');
|
|
|
|
const repos = require('./repos.json');
|
|
|
|
const giteaReviews = new GiteaReviews(process.env.GITEA_TOKEN, kreditsAmounts);
|
|
|
|
giteaReviews.getReviewContributions(repos.gitea, startDate, endDate).then(reviewContributions => {
|
|
console.log('GITEA REVIEW CONTRIBUTIONS', reviewContributions);
|
|
});
|
|
|
|
const githubReviews = new GithubReviews(process.env.GITHUB_TOKEN, kreditsAmounts);
|
|
|
|
githubReviews.getReviewContributions(repos.github, startDate, endDate).then(reviewContributions => {
|
|
console.log('GITHUB REVIEW CONTRIBUTIONS', reviewContributions);
|
|
});
|
|
|