GitHubCheckRunEventModel#
- pydantic model safir.github.webhooks.GitHubCheckRunEventModel#
A Pydantic model for the
check_run
webhook payload.https://docs.github.com/en/webhooks/webhook-events-and-payloads#check_run
- Parameters:
data (
Any
) –
Show JSON schema
{ "title": "GitHubCheckRunEventModel", "description": "A Pydantic model for the ``check_run`` webhook payload.\n\nhttps://docs.github.com/en/webhooks/webhook-events-and-payloads#check_run", "type": "object", "properties": { "action": { "allOf": [ { "$ref": "#/$defs/GitHubCheckRunEventAction" } ], "description": "The action that was performed." }, "repository": { "allOf": [ { "$ref": "#/$defs/GitHubRepositoryModel" } ], "description": "The repository that the check run was run against." }, "installation": { "allOf": [ { "$ref": "#/$defs/GitHubAppInstallationModel" } ], "description": "Information about the GitHub App installation." }, "check_run": { "allOf": [ { "$ref": "#/$defs/GitHubCheckRunModel" } ], "description": "Information about the check run." } }, "$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" }, "GitHubCheckRunConclusion": { "description": "The check run conclusion state.", "enum": [ "success", "failure", "neutral", "cancelled", "timed_out", "action_required", "stale" ], "title": "GitHubCheckRunConclusion", "type": "string" }, "GitHubCheckRunEventAction": { "description": "The action performed in a GitHub ``check_run`` webhook\n(`GitHubCheckRunEventModel`).", "enum": [ "completed", "created", "requested_action", "rerequested" ], "title": "GitHubCheckRunEventAction", "type": "string" }, "GitHubCheckRunModel": { "description": "A Pydantic model for the \"check_run\" field in a check_run webhook\npayload (`~safir.github.webhooks.GitHubCheckRunEventModel`).", "properties": { "id": { "description": "Identifier for this check run.", "title": "Id", "type": "integer" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Identifier set by the check runner.", "title": "External Id" }, "head_sha": { "description": "The SHA of the most recent commit for this check suite.", "title": "Head sha", "type": "string" }, "status": { "allOf": [ { "$ref": "#/$defs/GitHubCheckRunStatus" } ], "description": "Status of the check run." }, "conclusion": { "anyOf": [ { "$ref": "#/$defs/GitHubCheckRunConclusion" }, { "type": "null" } ], "default": null, "description": "Conclusion status, if completed." }, "name": { "description": "Name of the check run.", "title": "Name", "type": "string" }, "url": { "description": "URL of the check run API resource.", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Url", "type": "string" }, "html_url": { "description": "URL of the check run webpage.", "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Html Url", "type": "string" }, "check_suite": { "allOf": [ { "$ref": "#/$defs/GitHubCheckSuiteId" } ], "description": "Brief information about the check suite." }, "output": { "anyOf": [ { "$ref": "#/$defs/GitHubCheckRunOutput" }, { "type": "null" } ], "default": null, "description": "Check run output, if available.", "title": "Output" }, "pull_requests": { "description": "List of pull requests associated with this check run.", "items": { "$ref": "#/$defs/GitHubCheckRunPrInfoModel" }, "title": "Pull Requests", "type": "array" } }, "required": [ "id", "external_id", "head_sha", "status", "name", "url", "html_url", "check_suite" ], "title": "GitHubCheckRunModel", "type": "object" }, "GitHubCheckRunOutput": { "description": "Check run output report.", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Title of the report", "title": "Title" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Summary information (markdown formatted).", "title": "Summary" }, "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Extended report (markdown)", "title": "Text" } }, "title": "GitHubCheckRunOutput", "type": "object" }, "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" }, "GitHubCheckRunStatus": { "description": "The check run status.", "enum": [ "queued", "in_progress", "completed" ], "title": "GitHubCheckRunStatus", "type": "string" }, "GitHubCheckSuiteId": { "description": "Brief information about a check suite in the `GitHubCheckRunModel`.", "properties": { "id": { "description": "Check suite ID", "title": "Id", "type": "integer" } }, "required": [ "id" ], "title": "GitHubCheckSuiteId", "type": "object" }, "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", "repository", "installation", "check_run" ] }
- Fields:
- field action: GitHubCheckRunEventAction [Required]#
The action that was performed.
- field check_run: GitHubCheckRunModel [Required]#
Information about the check run.
- field installation: GitHubAppInstallationModel [Required]#
Information about the GitHub App installation.
- field repository: GitHubRepositoryModel [Required]#
The repository that the check run was run against.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding
ComputedFieldInfo
objects.