aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libbugzilla.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-02 23:07:53 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-03 00:41:11 +0100
commit93bd458f3f60b47ccb4f1d1d0f2688b267eab55f (patch)
treec4d6e0a4d9836b5a1edfb580d4c6113be93a21ff /lib/libbugzilla.js
parent5d61ae1855a017eadee8018f9c7345ef11478868 (diff)
downloadbugzilla-triage-93bd458f3f60b47ccb4f1d1d0f2688b267eab55f.tar.gz
Make script working with Mozilla bugzilla.
* Store all functions in an array and store just indexes in the SELECT * add pageMod options for other bugzillas
Diffstat (limited to 'lib/libbugzilla.js')
-rw-r--r--lib/libbugzilla.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index bdcf8fb..9300c49 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -176,7 +176,8 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c
}
}
- if ("sentUpstreamString" in config.gJSONData.commentStrings) {
+ if (config.gJSONData.commentStrings &&
+ "sentUpstreamString" in config.gJSONData.commentStrings) {
config.constantData.commentStrings = {};
config.constantData.commentStrings.sentUpstreamString =
config.gJSONData.commentStrings["sentUpstreamString"];
@@ -326,25 +327,13 @@ exports.initialize = function initialize(config, callback) {
});
}
- // config.logger = new logger.Logger(JSON.parse(
- // self.data.load("bugzillalabelAbbreviations.json")));
-
config.configData = {};
config.configData.matches = config.gJSONData.configData.matches;
config.configData.skipMatches = config.configData.matches.map(function(x) {
return x.replace("show_bug.cgi.*","((process|post)_bug|attachment)\.cgi$");
});
- // config.objConstructor = {};
- // var bzType = config.gJSONData.configData.objectStyle;
- // if (bzType === "RH") {
- // config.objConstructor = require("rhbzpage").RHBugzillaPage;
- // } else if (bzType === "MoFo") {
- // }
- // config.objConstructor = require("mozillabzpage").MozillaBugzilla;
-
config.constantData = {};
- // TODO this is important and missing
if ("constantData" in config.gJSONData) {
config.constantData = config.gJSONData.constantData;
config.constantData.queryUpstreamBug = JSON.parse(
@@ -375,8 +364,6 @@ exports.initialize = function initialize(config, callback) {
if ("submitsLogging" in config.gJSONData.configData &&
config.gJSONData.configData.submitsLogging) {
- console.log("initialize : submitsLogin = " +
- config.gJSONData.configData.submitsLogging);
logger.initialize(JSON.parse(selfMod.data.load(
"bugzillalabelAbbreviations.json")));
}