def init_app(app): bzurl = app.config.get("BUGZILLA_URL", DEFAULT_BUGZILLA_URL) if not app.config.get("BUGZILLA_API_KEY", None): log.warning("No bugzilla api key specified. (Set BUGZILLA_API_KEY in config to fix)") bzclient = BugzillaClient() bzclient.configure(bzurl=bzurl, apikey=app.config.get("BUGZILLA_API_KEY", None)) app.bzclient = bzclient
def init_app(app): bzurl = app.config.get('BUGZILLA_URL', DEFAULT_BUGZILLA_URL) if not app.config.get('BUGZILLA_API_KEY', None): log.warning( "No bugzilla api key specified. (Set BUGZILLA_API_KEY in config to fix)" ) bzclient = BugzillaClient() bzclient.configure(bzurl=bzurl, apikey=app.config.get('BUGZILLA_API_KEY', None)) app.bzclient = bzclient
def init_app(app): bzurl = app.config.get('BUGZILLA_URL', DEFAULT_BUGZILLA_URL) if not app.config.get('BUGZILLA_USER', None): log.warning("No bugzilla user specified. (Set BUGZILLA_USER in config to fix)") if not app.config.get('BUGZILLA_PASS', None): log.warning("No bugzilla password specified. (Set BUGZILLA_PASS in config to fix)") bzclient = BugzillaClient() bzclient.configure(bzurl=bzurl, username=app.config.get('BUGZILLA_USER', None), password=app.config.get('BUGZILLA_PASS', None)) app.bzclient = bzclient
def init_app(app): bzurl = app.config.get('BUGZILLA_URL', DEFAULT_BUGZILLA_URL) if not app.config.get('BUGZILLA_USER', None): log.warning( "No bugzilla user specified. (Set BUGZILLA_USER in config to fix)") if not app.config.get('BUGZILLA_PASS', None): log.warning( "No bugzilla password specified. (Set BUGZILLA_PASS in config to fix)" ) bzclient = BugzillaClient() bzclient.configure(bzurl=bzurl, username=app.config.get('BUGZILLA_USER', None), password=app.config.get('BUGZILLA_PASS', None)) app.bzclient = bzclient
from collections import defaultdict from gevent import queue from gevent import local log_data = local.local() from bzrest.client import BugzillaClient messages = queue.Queue() config = {} bugzilla_client = BugzillaClient() results = defaultdict(lambda: defaultdict(dict)) from .processor import Processor processor = Processor() from .messenger import Messenger messenger = Messenger() semaphores = {}
"resolution": "---", "last_change_time": since, } print("In progress work (unresolved and not assigned to nobody):") return make_report(product, bz, bzurl, args, ignore_assignees=["*****@*****.**"]) if __name__ == "__main__": import argparse from bzrest.client import BugzillaClient parser = argparse.ArgumentParser() parser.add_argument("--product", dest="product", default="Release Engineering") parser.add_argument("--bugzilla-url", dest="bzurl", default="https://bugzilla.mozilla.org") parser.add_argument("--bugzilla-api-url", dest="bzapi", default="http://bugzilla.mozilla.org/rest") parser.add_argument("--since", dest="since") parser.add_argument("reports", nargs="+") args = parser.parse_args() bz = BugzillaClient() bz.configure(args.bzapi, None, None) for report in args.reports: if report not in ("fixed", "inprogress"): raise Exception("Invalid report type: '%s'" % report) for report in args.reports: if report == "fixed": print(fixed_report(args.product, bz, args.bzurl, args.since)) elif report == "inprogress": print(inprogress_report(args.product, bz, args.bzurl, args.since))