import typing


def format_issue_or_pr(data: typing.Dict[str, typing.Any], include_title: bool = True) -> str:
    """
    Format a GitHub issue or pull request JSON into a markdown message.

    If include_title is true, the title of the issue will also be included.
    """
    result = f"[**#{data['number']}**]({data['html_url']})"
    if include_title:
        result += f" (*{data['title']}*)"
    if data.get("draft", False):
        result += " (Draft)"
    return result