def get_landing_patterns()

in libmozdata/bugzilla.py [0:0]


    def get_landing_patterns(channels=["release", "beta", "aurora", "nightly"]):
        if not isinstance(channels, list):
            channels = [channels]

        landing_patterns = []
        for channel in channels:
            if channel in ["central", "nightly"]:
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/mozilla-central/rev/([0-9a-f]+)"
                        ),
                        channel,
                    ),
                    (
                        re.compile(
                            r"://hg.mozilla.org/mozilla-central/pushloghtml\?changeset=([0-9a-f]+)"
                        ),
                        channel,
                    ),
                ]
            elif channel == "inbound":
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/integration/mozilla-inbound/rev/([0-9a-f]+)"
                        ),
                        "inbound",
                    )
                ]
            elif channel in ["release", "beta", "aurora"]:
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/releases/mozilla-"
                            + channel
                            + "/rev/([0-9a-f]+)"
                        ),
                        channel,
                    )
                ]
            elif channel == "esr":
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/releases/mozilla-esr(?:[0-9]+)/rev/([0-9a-f]+)"
                        ),
                        channel,
                    )
                ]
            elif channel == "fx-team":
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/integration/fx-team/rev/([0-9a-f]+)"
                        ),
                        "inbound",
                    )
                ]
            elif channel == "autoland":
                landing_patterns += [
                    (
                        re.compile(
                            r"://hg.mozilla.org/integration/autoland/rev/([0-9a-f]+)"
                        ),
                        "autoland",
                    )
                ]
            else:
                raise Exception("Unexpected channel: " + channel)

        return landing_patterns