MediaWiki integration & integration architecture improvements . #16

Merged
raucao merged 19 commits from feature/6-mediawiki_integration into master 2018-04-21 09:31:30 +00:00
Showing only changes of commit 3d810287c0 - Show all commits

View File

@@ -5,6 +5,11 @@ module.exports = async function(robot, kredits) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.debug('[hubot-kredits] Loading GitHub integration...');
let repoBlackList = [];
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
if (process.env.KREDITS_GITHUB_REPO_BLACKLIST) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
repoBlackList = process.env.KREDITS_GITHUB_REPO_BLACKLIST.split(',');
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.debug('[hubot-kredits] Ignoring GitHub actions from ', util.inspect(repoBlackList));
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
}
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
const Contributor = kredits.Contributor;
const Operator = kredits.Operator;
@@ -15,7 +20,7 @@ module.exports = async function(robot, kredits) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
return c.github_username === username;
});
if (!contrib) {
throw new Error(`No contributor found for ${username}`);A
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
throw new Error(`No contributor found for ${username}`);
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
} else {
return contrib;
}
@@ -73,9 +78,15 @@ module.exports = async function(robot, kredits) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let web_url = issue.html_url;
let amount = amountFromIssueLabels(issue);
let repoName = issue.repository_url.match(/.*\/(.+\/.+)$/)[1];
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let description = `${repoName}: ${issue.title}`;
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
if (amount === 0) {
robot.logger.info('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
return Promise.resolve();
} else if (repoBlackList.includes(repoName)) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.debug(`[hubot-kredits] ${repoName} is on black list; ignoring`);
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
return Promise.resolve();
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
}
if (assignees.length > 0) {
@@ -84,9 +95,6 @@ module.exports = async function(robot, kredits) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
recipients = [issue.user.login];
}
let repoName = issue.repository_url.match(/.*\/(.+\/.+)$/)[1];
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let description = `${repoName}: ${issue.title}`;
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let proposalPromises = [];
recipients.forEach(recipient => {
proposalPromises.push(
@@ -120,13 +128,17 @@ module.exports = async function(robot, kredits) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
})
.then(issue => {
let amount = amountFromIssueLabels(issue);
if (amount === 0) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.info('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
return;
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
}
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let repoName = pull_request.base.repo.full_name;
let description = `${repoName}: ${pull_request.title}`;
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
if (amount === 0) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.info('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
return Promise.resolve();
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
} else if (repoBlackList.includes(repoName)) {
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
robot.logger.debug(`[hubot-kredits] ${repoName} is on black list; ignoring`);
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
return Promise.resolve();
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
}
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
let proposalPromises = [];
recipients.forEach(recipient => {
console.debug(`[hubot-kredits] Creating proposal for ${recipient}...`);
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
bumi commented 2018-04-19 11:38:20 +00:00 (Migrated from github.com)
Review

do we need a const util = require('util'); in this file?

do we need a `const util = require('util');` in this file?
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.
raucao commented 2018-04-19 11:40:25 +00:00 (Migrated from github.com)
Review

Please ignore the code until I have pushed all of my changes. Thanks.

Please ignore the code until I have pushed all of my changes. Thanks.