{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the check. For example, \"code-coverage\"."
    },
    "details_url": {
      "type": "string",
      "description": "The URL of the integrator's site that has the full details of the check."
    },
    "external_id": {
      "type": "string",
      "description": "A reference for the run on the integrator's system."
    },
    "started_at": {
      "type": "string",
      "format": "date-time",
      "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."
    },
    "status": {
      "type": "string",
      "description": "The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.",
      "enum": [
        "queued",
        "in_progress",
        "completed",
        "waiting",
        "requested",
        "pending"
      ]
    },
    "conclusion": {
      "type": "string",
      "description": "**Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.",
      "enum": [
        "action_required",
        "cancelled",
        "failure",
        "neutral",
        "success",
        "skipped",
        "stale",
        "timed_out"
      ]
    },
    "completed_at": {
      "type": "string",
      "format": "date-time",
      "description": "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`."
    },
    "output": {
      "type": "object",
      "description": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.",
      "properties": {
        "title": {
          "type": "string",
          "description": "**Required**."
        },
        "summary": {
          "type": "string",
          "description": "Can contain Markdown.",
          "maxLength": 65535
        },
        "text": {
          "type": "string",
          "description": "Can contain Markdown.",
          "maxLength": 65535
        },
        "annotations": {
          "type": "array",
          "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about annotations in the UI, see \"[About status checks](https://docs.github.com/articles/about-status-checks#checks)\".",
          "maxItems": 50,
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The path of the file to add an annotation to. For example, `assets/css/main.css`."
              },
              "start_line": {
                "type": "integer",
                "description": "The start line of the annotation. Line numbers start at 1."
              },
              "end_line": {
                "type": "integer",
                "description": "The end line of the annotation."
              },
              "start_column": {
                "type": "integer",
                "description": "The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1."
              },
              "end_column": {
                "type": "integer",
                "description": "The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values."
              },
              "annotation_level": {
                "type": "string",
                "description": "The level of the annotation.",
                "enum": [
                  "notice",
                  "warning",
                  "failure"
                ]
              },
              "message": {
                "type": "string",
                "description": "A short description of the feedback for these lines of code. The maximum size is 64 KB."
              },
              "title": {
                "type": "string",
                "description": "The title that represents the annotation. The maximum size is 255 characters."
              },
              "raw_details": {
                "type": "string",
                "description": "Details about this annotation. The maximum size is 64 KB."
              }
            },
            "required": [
              "path",
              "start_line",
              "end_line",
              "annotation_level",
              "message"
            ]
          }
        },
        "images": {
          "type": "array",
          "description": "Adds images to the output displayed in the GitHub pull request UI.",
          "items": {
            "type": "object",
            "properties": {
              "alt": {
                "type": "string",
                "description": "The alternative text for the image."
              },
              "image_url": {
                "type": "string",
                "description": "The full URL of the image."
              },
              "caption": {
                "type": "string",
                "description": "A short image description."
              }
            },
            "required": [
              "alt",
              "image_url"
            ]
          }
        }
      },
      "required": [
        "summary"
      ]
    },
    "actions": {
      "type": "array",
      "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions).\"",
      "maxItems": 3,
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 20,
            "description": "The text to be displayed on a button in the web UI. The maximum size is 20 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 40,
            "description": "A short explanation of what this action would do. The maximum size is 40 characters."
          },
          "identifier": {
            "type": "string",
            "maxLength": 20,
            "description": "A reference for the action on the integrator's system. The maximum size is 20 characters."
          }
        },
        "required": [
          "label",
          "description",
          "identifier"
        ]
      }
    }
  },
  "anyOf": [
    {
      "properties": {
        "status": {
          "const": "completed"
        }
      },
      "additionalProperties": true
    },
    {
      "properties": {
        "status": {
          "enum": [
            "queued",
            "in_progress"
          ]
        }
      },
      "additionalProperties": true
    }
  ],
  "$schema": "https://json-schema.org/draft/2019-09/schema"
}