GitHubCheckSuiteModel

pydantic model safir.github.models.GitHubCheckSuiteModel

A Pydantic model for the check_suite field in a check_suite webhook (GitHubCheckSuiteEventModel).

Parameters:

data (Any)

Show JSON schema
{
   "title": "GitHubCheckSuiteModel",
   "description": "A Pydantic model for the ``check_suite`` field in a ``check_suite``\nwebhook (`~safir.github.webhooks.GitHubCheckSuiteEventModel`).",
   "type": "object",
   "properties": {
      "id": {
         "description": "Identifier for this check run.",
         "title": "Id",
         "type": "integer"
      },
      "head_branch": {
         "description": "Name of the branch the changes are on.",
         "title": "Head Branch",
         "type": "string"
      },
      "head_sha": {
         "description": "The SHA of the most recent commit for this check suite.",
         "title": "Head Sha",
         "type": "string"
      },
      "url": {
         "description": "GitHub API URL for the check suite resource.",
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Url",
         "type": "string"
      },
      "status": {
         "allOf": [
            {
               "$ref": "#/$defs/GitHubCheckSuiteStatus"
            }
         ],
         "description": "The status of the check suite."
      },
      "conclusion": {
         "anyOf": [
            {
               "$ref": "#/$defs/GitHubCheckSuiteConclusion"
            },
            {
               "type": "null"
            }
         ],
         "description": "The conclusion of the check suite."
      },
      "pull_requests": {
         "description": "A list of pull requests associated with this check suite.",
         "items": {
            "$ref": "#/$defs/GitHubCheckRunPrInfoModel"
         },
         "title": "Pull Requests",
         "type": "array"
      }
   },
   "$defs": {
      "GitHubCheckRunPrInfoModel": {
         "description": "A Pydantic model of the ``pull_requests[]`` items in a check run\nGitHub API model (`GitHubCheckRunModel`).\n\nhttps://docs.github.com/en/rest/checks/runs#get-a-check-run",
         "properties": {
            "url": {
               "description": "GitHub API URL for this pull request.",
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Url",
               "type": "string"
            }
         },
         "required": [
            "url"
         ],
         "title": "GitHubCheckRunPrInfoModel",
         "type": "object"
      },
      "GitHubCheckSuiteConclusion": {
         "description": "The conclusion state of a GitHub check suite.",
         "enum": [
            "success",
            "failure",
            "neutral",
            "cancelled",
            "timed_out",
            "action_required",
            "stale"
         ],
         "title": "GitHubCheckSuiteConclusion",
         "type": "string"
      },
      "GitHubCheckSuiteStatus": {
         "description": "The status of a GitHub check suite.",
         "enum": [
            "queued",
            "in_progress",
            "completed"
         ],
         "title": "GitHubCheckSuiteStatus",
         "type": "string"
      }
   },
   "required": [
      "id",
      "head_branch",
      "head_sha",
      "url",
      "status",
      "conclusion",
      "pull_requests"
   ]
}

Fields:
field conclusion: GitHubCheckSuiteConclusion | None [Required]

The conclusion of the check suite.

field head_branch: str [Required]

Name of the branch the changes are on.

field head_sha: str [Required]

The SHA of the most recent commit for this check suite.

field id: int [Required]

Identifier for this check run.

field pull_requests: list[GitHubCheckRunPrInfoModel] [Required]

A list of pull requests associated with this check suite.

field status: GitHubCheckSuiteStatus [Required]

The status of the check suite.

field url: HttpUrl [Required]

GitHub API URL for the check suite resource.

Constraints:
  • max_length = 2083

  • allowed_schemes = [‘http’, ‘https’]