def get_bugfixes(rows): bugs = dict((row["bug_id"], row) for row in rows) nixing = [] for bug_id in bugs.keys(): logging.info("... working on bug %s", bug_id) try: etree = bugzillalib.bz_query_bug_id("bugzilla.pculture.org", bug_id) except socket.error, se: logging.error("... error %s -- skipping", se) bug = etree.find("bug") version = bug.find("version") if version is None: logging.info("version is None") continue version = get_name(version) version = clean_up_name(version) if version in ("git-master", "unknown", "nightly build"): logging.info("... nixing %s", bug_id) nixing.append((bug_id, bugs[bug_id]["short_desc"])) del bugs[bug_id] continue
def get_bugfixes(rows): bugs = dict((row["bug_id"], row) for row in rows) for bug_id in bugs.keys(): logging.info("... working on bug %s", bug_id) try: etree = bugzillalib.bz_query_bug_id("bugzilla.pculture.org", bug_id) except socket.error, se: logging.error("... error %s -- skipping", se) bug = etree.find("bug")
def get_bugzilla_reporters(milestone): logging.info("pulling bugzilla reporters/commenters....") reporters = {} rows = bugzillalib.bz_query("bugzilla.pculture.org", [ ("query_format", "advanced"), ("product", "Miro"), ("bug_status", "RESOLVED"), ("bug_status", "VERIFIED"), ("resolution", "FIXED"), ("target_milestone", milestone), ("order", "Bug Number"), ("ctype", "csv") ]) bug_ids = [row["bug_id"] for row in rows] for bug_id in bug_ids: logging.info("... working on bug %s", bug_id) try: etree = bugzillalib.bz_query_bug_id("bugzilla.pculture.org", bug_id) except socket.error, se: logging.error("... error %s -- skipping", se) bug = etree.find("bug") reporter = bug.find("reporter") if reporter is None: logging.info("reporter is None") continue reporter = get_name(reporter) reporter = clean_up_name(reporter) reporter = (reporter, "bug reporter") reporters[reporter] = reporters.get(reporter, 0) + 1 descs = bug.getiterator("long_desc") for desc in descs: commenter = desc.find("who") if commenter is None: logging.info("commenter is None") continue commenter = get_name(commenter) commenter = clean_up_name(commenter) commenter = (commenter, "bug reporter") reporters[commenter] = reporters.get(commenter, 0) + 1