def get_history_matches()

in libmozdata/bugzilla.py [0:0]


    def get_history_matches(history, change_to_match):
        history_entries = []

        for history_entry in history:
            for change in history_entry["changes"]:
                matches = True

                for change_key, change_value in change.items():
                    for key, value in change_to_match.items():
                        if (
                            key == change_key
                            and value != change_value
                            and value not in change_value.split(", ")
                        ):
                            matches = False
                            break

                    if not matches:
                        break

                if matches:
                    history_entries.append(history_entry)
                    break

        return history_entries