GitHubCheckRunEventModel#
- pydantic model safir.github.webhooks.GitHubCheckRunEventModel#
A Pydantic model for the
check_run
webhook payload.- Parameters:
data (
Any
) –
Show JSON schema
{ "title": "GitHubCheckRunEventModel", "description": "A Pydantic model for the ``check_run`` webhook payload.\n\nhttps://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#check_run", "type": "object", "properties": { "action": { "description": "The action that was performed.", "allOf": [ { "$ref": "#/definitions/GitHubCheckRunEventAction" } ] }, "repository": { "title": "Repository", "description": "The repository that the check run was run against.", "allOf": [ { "$ref": "#/definitions/GitHubRepositoryModel" } ] }, "installation": { "title": "Installation", "description": "Information about the GitHub App installation.", "allOf": [ { "$ref": "#/definitions/GitHubAppInstallationModel" } ] }, "check_run": { "title": "Check Run", "description": "Information about the check run.", "allOf": [ { "$ref": "#/definitions/GitHubCheckRunModel" } ] } }, "required": [ "action", "repository", "installation", "check_run" ], "definitions": { "GitHubCheckRunEventAction": { "title": "GitHubCheckRunEventAction", "description": "The action performed in a GitHub ``check_run`` webhook\n(`GitHubCheckRunEventModel`).", "enum": [ "completed", "created", "requested_action", "rerequested" ], "type": "string" }, "GitHubRepoOwnerModel": { "title": "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", "type": "object", "properties": { "login": { "title": "Login name", "description": "Login name of the owner (either a user or an organization).", "example": "lsst-sqre", "type": "string" } }, "required": [ "login" ] }, "GitHubRepositoryModel": { "title": "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", "type": "object", "properties": { "name": { "title": "Repository name", "description": "Excludes owner prefix.", "example": "times-square-demo", "type": "string" }, "full_name": { "title": "Full name", "description": "Full name, including owner prefix (e.g. ``lsst-sqre/times-square-demo``).)", "example": "lsst-sqre/times-square-demo", "type": "string" }, "owner": { "title": "Owner", "description": "The repository's owner.", "allOf": [ { "$ref": "#/definitions/GitHubRepoOwnerModel" } ] }, "default_branch": { "title": "Default Branch", "description": "The default branch (e.g. main).", "example": "main", "type": "string" }, "html_url": { "title": "Html Url", "description": "URL of the repository for browsers.", "example": "https://github.com/lsst-sqre/times-square-demo", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "branches_url": { "title": "Branches Url", "description": "URI template for the repo's branches endpoint.", "example": "https://github.com/lsst-sqre/times-square-demo/branches{/branch}", "type": "string" }, "contents_url": { "title": "Contents Url", "description": "URI template for the contents endpoint.", "example": "https://github.com/lsst-sqre/times-square-demo/contents/{+path}", "type": "string" }, "trees_url": { "title": "Trees Url", "description": "URI template for the Git tree API.", "example": "https://github.com/lsst-sqre/times-square-demo/git/trees{/sha}", "type": "string" }, "blobs_url": { "title": "Blobs Url", "description": "URI template for the Git blobs API.", "example": "https://github.com/lsst-sqre/times-square-demo/git/blobs{/sha}", "type": "string" } }, "required": [ "name", "full_name", "owner", "default_branch", "html_url", "branches_url", "contents_url", "trees_url", "blobs_url" ] }, "GitHubAppInstallationModel": { "title": "GitHubAppInstallationModel", "description": "A Pydantic model for the ``installation`` field found in webhook\npayloads for GitHub Apps.", "type": "object", "properties": { "id": { "title": "Id", "description": "The installation ID.", "type": "string" } }, "required": [ "id" ] }, "GitHubCheckRunStatus": { "title": "GitHubCheckRunStatus", "description": "The check run status.", "enum": [ "queued", "in_progress", "completed" ], "type": "string" }, "GitHubCheckRunConclusion": { "title": "GitHubCheckRunConclusion", "description": "The check run conclusion state.", "enum": [ "success", "failure", "neutral", "cancelled", "timed_out", "action_required", "stale" ], "type": "string" }, "GitHubCheckSuiteId": { "title": "GitHubCheckSuiteId", "description": "Brief information about a check suite in the `GitHubCheckRunModel`.", "type": "object", "properties": { "id": { "title": "Id", "description": "Check suite ID", "type": "string" } }, "required": [ "id" ] }, "GitHubCheckRunOutput": { "title": "GitHubCheckRunOutput", "description": "Check run output report.", "type": "object", "properties": { "title": { "title": "Title", "description": "Title of the report", "type": "string" }, "summary": { "title": "Summary", "description": "Summary information (markdown formatted).", "type": "string" }, "text": { "title": "Text", "description": "Extended report (markdown)", "type": "string" } } }, "GitHubCheckRunPrInfoModel": { "title": "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", "type": "object", "properties": { "url": { "title": "Url", "description": "GitHub API URL for this pull request.", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" } }, "required": [ "url" ] }, "GitHubCheckRunModel": { "title": "GitHubCheckRunModel", "description": "A Pydantic model for the \"check_run\" field in a check_run webhook\npayload (`~safir.github.webhooks.GitHubCheckRunEventModel`).", "type": "object", "properties": { "id": { "title": "Id", "description": "Identifier for this check run.", "type": "string" }, "external_id": { "title": "External Id", "description": "Identifier set by the check runner.", "type": "string" }, "head_sha": { "title": "Head sha", "description": "The SHA of the most recent commit for this check suite.", "type": "string" }, "status": { "description": "Status of the check run.", "allOf": [ { "$ref": "#/definitions/GitHubCheckRunStatus" } ] }, "conclusion": { "description": "Conclusion status, if completed.", "allOf": [ { "$ref": "#/definitions/GitHubCheckRunConclusion" } ] }, "name": { "title": "Name", "description": "Name of the check run.", "type": "string" }, "url": { "title": "Url", "description": "URL of the check run API resource.", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "html_url": { "title": "Html Url", "description": "URL of the check run webpage.", "minLength": 1, "maxLength": 2083, "format": "uri", "type": "string" }, "check_suite": { "title": "Check Suite", "description": "Brief information about the check suite.", "allOf": [ { "$ref": "#/definitions/GitHubCheckSuiteId" } ] }, "output": { "title": "Output", "description": "Check run output, if available.", "allOf": [ { "$ref": "#/definitions/GitHubCheckRunOutput" } ] }, "pull_requests": { "title": "Pull Requests", "description": "List of pull requests associated with this check run.", "type": "array", "items": { "$ref": "#/definitions/GitHubCheckRunPrInfoModel" } } }, "required": [ "id", "head_sha", "status", "name", "url", "html_url", "check_suite" ] } } }
- 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.