Remove ticket directives like "(closes #123).

    >>> remove_ticket_directives('(closes #123)')
    '(#123)'
    >>> remove_ticket_directives('(foo #123)')
    '(foo #123)'

def remove_ticket_directives(message):
    """Remove ticket directives like "(closes #123).

    >>> remove_ticket_directives('(closes #123)')
    '(#123)'
    >>> remove_ticket_directives('(foo #123)')
    '(foo #123)'
    """
    if message:
        message = re.sub(r'closes #', '#', message)
        message = re.sub(r'addresses #', '#', message)
        message = re.sub(r'references #', '#', message)
    return message