From 54beca150191e970b8603727fa5595535922bd7a Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 18 Apr 2013 17:06:25 +0000 Subject: [PATCH] Add config options; remove closed milestone count --- modules/project/config.json | 4 ++++ modules/project/pages.js | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 modules/project/config.json diff --git a/modules/project/config.json b/modules/project/config.json new file mode 100644 index 0000000..f31a1c9 --- /dev/null +++ b/modules/project/config.json @@ -0,0 +1,4 @@ +{ + "quotecat":"depressionbot", + "dependencies": ["web", "quotes", "github"] +} diff --git a/modules/project/pages.js b/modules/project/pages.js index 637a284..e2dfd3c 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -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) - }); });