From 74299b96b93f97bef1b4e891b9d1e2403e825a10 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 21 Feb 2012 17:44:26 -0500 Subject: [PATCH] Show issues on GitHub that start with the translator label --- .../tools/testTranslators/testTranslators.js | 78 ++++++++++++++++++- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/tools/testTranslators/testTranslators.js b/chrome/content/zotero/tools/testTranslators/testTranslators.js index 54d333a810..1808c6943b 100644 --- a/chrome/content/zotero/tools/testTranslators/testTranslators.js +++ b/chrome/content/zotero/tools/testTranslators/testTranslators.js @@ -25,7 +25,7 @@ const NUM_CONCURRENT_TESTS = 6; const TRANSLATOR_TYPES = ["Web", "Import", "Export", "Search"]; -const TABLE_COLUMNS = ["Translator", "Supported", "Status", "Pending", "Succeeded", "Failed", "Mismatch"]; +const TABLE_COLUMNS = ["Translator", "Supported", "Status", "Pending", "Succeeded", "Failed", "Mismatch", "Issues"]; var translatorTables = {}, translatorTestViews = {}, translatorTestViewsToRun = {}, @@ -35,6 +35,53 @@ var translatorTables = {}, currentOutputView, viewerMode = true; +/** + * Fetches issue information from GitHub + */ +var Issues = new function() { + var _executeWhenRetrieved = []; + var githubInfo; + + /** + * Gets issues for a specific translator + * @param {String} translatorLabel Gets issues starting with translatorLabel + * @param {Function} callback Function to call when issue information is available + */ + this.getFor = function(translatorLabel, callback) { + translatorLabel = translatorLabel.toLowerCase(); + + var whenRetrieved = function() { + var issues = []; + for(var i=0; i