def get_description(contents):
    """
    Gets the description of an ZTAP note.
    Type will be prefixed to the first line of the comment/log.
    """
    note = contents.get("contents")
    if not note:
        return ""

    first_line = note.split("\n")[0]

    typ = contents.get("type")
    if typ == "comment":
        description = "ZTAP Comment: " + first_line
    elif typ == "log":
        description = "ZTAP Log: " + first_line
    else:
        description = ""

    return description