import json


def build_gh_issue_body(submission):
    """ Build the body of a GitHub issue for the submission of a simulator

    Args:
        submission (:obj:`SimulatorSubmission`): simulator

    Returns:
        :obj:`str`: body for a GitHub issue for the submission of a simulator
    """
    return "\n".join([
        "---",
        "id: {}".format(submission.id),
        "version: {}".format(submission.version),
        "specificationsUrl: {}".format(submission.specifications_url),
        "specificationsPatch: {}".format(json.dumps(submission.specifications_patch)),
        "validateImage: {}".format(submission.validate_image),
        "commitSimulator: {}".format(submission.commit_simulator),
        "",
        "---",
    ])