How to use the libmozdata.hgmozilla.Revision.get_url function in libmozdata

To help you get started, we’ve selected a few libmozdata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / relman-auto-nag / auto_nag / scripts / code_freeze_week.py View on Github external
def get_hg(self, bugs):
        url = hgmozilla.Revision.get_url("nightly")
        queries = []

        def handler_rev(json, data):
            push = json["pushdate"][0]
            push = datetime.datetime.utcfromtimestamp(push)
            push = lmdutils.as_utc(push)
            data["date"] = lmdutils.get_date_str(push)
            data["backedout"] = utils.is_backout(json)
            m = BUG_PAT.search(json["desc"])
            if not m or m.group(1) != data["bugid"]:
                data["bugid"] = ""

        for info in bugs.values():
            for rev, i in info["land"].items():
                queries.append(Query(url, {"node": rev}, handler_rev, i))