Merge pull request #62 from 67P/feature/wiki_changes
Only create small automatic contributions for wiki edits
This commit is contained in:
commit
82a003ffeb
@ -126,6 +126,7 @@ module.exports = async function(robot, kredits) {
|
|||||||
return [...new Set(changes.map(c => `"${c.title}"`))].join(', ');
|
return [...new Set(changes.map(c => `"${c.title}"`))].join(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Currently not used
|
||||||
function calculateAmountForChanges(details) {
|
function calculateAmountForChanges(details) {
|
||||||
let amount;
|
let amount;
|
||||||
|
|
||||||
@ -144,9 +145,7 @@ module.exports = async function(robot, kredits) {
|
|||||||
const dateNow = new Date();
|
const dateNow = new Date();
|
||||||
const dateYesterday = dateNow.setDate(dateNow.getDate() - 1);
|
const dateYesterday = dateNow.setDate(dateNow.getDate() - 1);
|
||||||
const date = (new Date(dateYesterday)).toISOString().split('T')[0];
|
const date = (new Date(dateYesterday)).toISOString().split('T')[0];
|
||||||
|
const amount = 500;
|
||||||
const details = analyzeUserChanges(user, changes);
|
|
||||||
const amount = calculateAmountForChanges(details);
|
|
||||||
|
|
||||||
let desc = `Added ${details.charsAdded} characters of text.`;
|
let desc = `Added ${details.charsAdded} characters of text.`;
|
||||||
if (details.pagesChanged.length > 0) {
|
if (details.pagesChanged.length > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user