def check_add_credit_to_script()

in foundation_security_advisories/update_hof.py [0:0]


def check_add_credit_to_script(email, credit):
    if " and " in credit:
        # Do not by default, add double-credits as a mapping.
        return False
    if email == "replace@replace.com":
        # This was an old field used to indicate we were filing a bug for someone
        return False
    if "@mozilla.com" in email:
        # Do not add mozilla emails to script, we probably filed them for someone else.
        return False
    if credit.strip()[0] == "@":
        raise Exception("It looks like a Twitter handle is in the credit field.")
    return True