Skip to content

Commit

Permalink
tool for listing all issues in all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
willosof committed Jul 5, 2018
1 parent fb25465 commit b08af2f
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tools/issuelist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
var request = require("request")

var get = function(url,cb) {
var options = {
url: url,
headers: {
'User-Agent': 'request'
},
json: true
};

request(options, function (error, response, body) {

if (!error) {
cb(null, response, body);
return;
}

cb(error, null, null);

});
};

var lineReader = require('readline').createInterface({
input: require('fs').createReadStream('.gitmodules')
});

lineReader.on('line', function (line) {
var found;
if (found = line.match('companion-module-(.+).git')) {
(function(module) {
get("http://api.github.com/repos/bitfocus/companion-module-"+module+"/issues", function(err, response, body) {
if (err === null) {
for (var i in body) {
var issue = body[i];
console.log("["+module+"] #" + issue.number+ ": " + issue.title);
}
}
else {
console.log("error:",err);
}
});
})(found[1])
}
});

0 comments on commit b08af2f

Please sign in to comment.