3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

Add config options; remove closed milestone count

This commit is contained in:
Douglas Gardner 2013-04-18 17:06:25 +00:00
parent c157ddf08c
commit 54beca1501
2 changed files with 5 additions and 8 deletions

View File

@ -0,0 +1,4 @@
{
"quotecat":"depressionbot",
"dependencies": ["web", "quotes", "github"]
}

View File

@ -11,15 +11,8 @@ var pages = function(dbot) {
/* TODO: merge back into github module */
var milestones;
request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones", function(e, r, b){
request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open", function(e, r, b){
milestones = JSON.parse(b);
request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=closed", function (a, c, d){
var milestones2 = [];
try{
milestones2 = JSON.parse(c);
} catch(e){}
milestones = milestones.concat(milestones2)
});
});