GitHubCheckSuiteEventModel#

pydantic model safir.github.webhooks.GitHubCheckSuiteEventModel#

A Pydantic model for the check_suite webhook payload.

https://docs.github.com/en/webhooks/webhook-events-and-payloads#check_suite

Parameters:

data (Any) –

Show JSON schema
{
   "title": "GitHubCheckSuiteEventModel",
   "description": "A Pydantic model for the ``check_suite`` webhook payload.\n\nhttps://docs.github.com/en/webhooks/webhook-events-and-payloads#check_suite",
   "type": "object",
   "properties": {
      "action": {
         "allOf": [
            {
               "$ref": "#/$defs/GitHubCheckSuiteEventAction"
            }
         ],
         "description": "The action performed."
      },
      "check_suite": {
         "allOf": [
            {
               "$ref": "#/$defs/GitHubCheckSuiteModel"
            }
         ],
         "description": "Information about the check suite."
      },
      "repository": {
         "allOf": [
            {
               "$ref": "#/$defs/GitHubRepositoryModel"
            }
         ],
         "description": "The repository that the check suite was run against."
      },
      "installation": {
         "allOf": [
            {
               "$ref": "#/$defs/GitHubAppInstallationModel"
            }
         ],
         "description": "Information about the GitHub App installation."
      }
   },
   "$defs": {
      "GitHubAppInstallationModel": {
         "description": "A Pydantic model for the ``installation`` field found in webhook\npayloads for GitHub Apps.",
         "properties": {
            "id": {
               "description": "The installation ID.",
               "title": "Id",
               "type": "integer"
            }
         },
         "required": [
            "id"
         ],
         "title": "GitHubAppInstallationModel",
         "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"
      },
      "GitHubCheckSuiteEventAction": {
         "description": "The action performed in a GitHub ``check_suite`` webhook\n(`GitHubCheckSuiteEventModel`).",
         "enum": [
            "completed",
            "requested",
            "rerequested"
         ],
         "title": "GitHubCheckSuiteEventAction",
         "type": "string"
      },
      "GitHubCheckSuiteModel": {
         "description": "A Pydantic model for the ``check_suite`` field in a ``check_suite``\nwebhook (`~safir.github.webhooks.GitHubCheckSuiteEventModel`).",
         "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."
            }
         },
         "required": [
            "id",
            "head_branch",
            "head_sha",
            "url",
            "status",
            "conclusion"
         ],
         "title": "GitHubCheckSuiteModel",
         "type": "object"
      },
      "GitHubCheckSuiteStatus": {
         "description": "The status of a GitHub check suite.",
         "enum": [
            "queued",
            "in_progress",
            "completed"
         ],
         "title": "GitHubCheckSuiteStatus",
         "type": "string"
      },
      "GitHubRepoOwnerModel": {
         "description": "A Pydantic model for the ``owner`` field found in repository objects.\n\nhttps://docs.github.com/en/rest/repos/repos#get-a-repository",
         "properties": {
            "login": {
               "description": "Login name of the owner (either a user or an organization).",
               "examples": [
                  "lsst-sqre"
               ],
               "title": "Login name",
               "type": "string"
            }
         },
         "required": [
            "login"
         ],
         "title": "GitHubRepoOwnerModel",
         "type": "object"
      },
      "GitHubRepositoryModel": {
         "description": "A Pydantic model for the ``repository`` field, often found in webhook\npayloads.\n\nhttps://docs.github.com/en/rest/repos/repos#get-a-repository",
         "properties": {
            "name": {
               "description": "Excludes owner prefix.",
               "examples": [
                  "times-square-demo"
               ],
               "title": "Repository name",
               "type": "string"
            },
            "full_name": {
               "description": "Full name, including owner prefix (e.g. ``lsst-sqre/times-square-demo``).)",
               "examples": [
                  "lsst-sqre/times-square-demo"
               ],
               "title": "Full name",
               "type": "string"
            },
            "owner": {
               "allOf": [
                  {
                     "$ref": "#/$defs/GitHubRepoOwnerModel"
                  }
               ],
               "description": "The repository's owner."
            },
            "default_branch": {
               "description": "The default branch (e.g. main).",
               "examples": [
                  "main"
               ],
               "title": "Default Branch",
               "type": "string"
            },
            "html_url": {
               "description": "URL of the repository for browsers.",
               "examples": [
                  "https://github.com/lsst-sqre/times-square-demo"
               ],
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Html Url",
               "type": "string"
            },
            "branches_url": {
               "description": "URI template for the repo's branches endpoint.",
               "examples": [
                  "https://github.com/lsst-sqre/times-square-demo/branches{/branch}"
               ],
               "title": "Branches Url",
               "type": "string"
            },
            "contents_url": {
               "description": "URI template for the contents endpoint.",
               "examples": [
                  "https://github.com/lsst-sqre/times-square-demo/contents/{+path}"
               ],
               "title": "Contents Url",
               "type": "string"
            },
            "trees_url": {
               "description": "URI template for the Git tree API.",
               "examples": [
                  "https://github.com/lsst-sqre/times-square-demo/git/trees{/sha}"
               ],
               "title": "Trees Url",
               "type": "string"
            },
            "blobs_url": {
               "description": "URI template for the Git blobs API.",
               "examples": [
                  "https://github.com/lsst-sqre/times-square-demo/git/blobs{/sha}"
               ],
               "title": "Blobs Url",
               "type": "string"
            }
         },
         "required": [
            "name",
            "full_name",
            "owner",
            "default_branch",
            "html_url",
            "branches_url",
            "contents_url",
            "trees_url",
            "blobs_url"
         ],
         "title": "GitHubRepositoryModel",
         "type": "object"
      }
   },
   "required": [
      "action",
      "check_suite",
      "repository",
      "installation"
   ]
}

Fields:
field action: GitHubCheckSuiteEventAction [Required]#

The action performed.

field check_suite: GitHubCheckSuiteModel [Required]#

Information about the check suite.

field installation: GitHubAppInstallationModel [Required]#

Information about the GitHub App installation.

field repository: GitHubRepositoryModel [Required]#

The repository that the check suite was run against.