GitHubCheckRunModel#
- pydantic model safir.github.models.GitHubCheckRunModel#
A Pydantic model for the “check_run” field in a check_run webhook payload (
GitHubCheckRunEventModel
).- Parameters:
data (
Any
) –
Show JSON schema
{ "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": { "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" } }, "$defs": { "GitHubCheckRunConclusion": { "description": "The check run conclusion state.", "enum": [ "success", "failure", "neutral", "cancelled", "timed_out", "action_required", "stale" ], "title": "GitHubCheckRunConclusion", "type": "string" }, "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" } }, "required": [ "id", "external_id", "head_sha", "status", "name", "url", "html_url", "check_suite" ] }
- Fields:
- field check_suite: GitHubCheckSuiteId [Required]#
Brief information about the check suite.
- field conclusion: GitHubCheckRunConclusion | None = None#
Conclusion status, if completed.
- field external_id: str | None [Required]#
Identifier set by the check runner.
- field head_sha: str [Required]#
The SHA of the most recent commit for this check suite.
- field html_url: HttpUrl [Required]#
URL of the check run webpage.
- Constraints:
max_length = 2083
allowed_schemes = [‘http’, ‘https’]
- field id: int [Required]#
Identifier for this check run.
- field name: str [Required]#
Name of the check run.
- field output: GitHubCheckRunOutput | None = None#
Check run output, if available.
- field pull_requests: list[GitHubCheckRunPrInfoModel] [Optional]#
List of pull requests associated with this check run.
- field status: GitHubCheckRunStatus [Required]#
Status of the check run.
- field url: HttpUrl [Required]#
URL of the check run API resource.
- Constraints:
max_length = 2083
allowed_schemes = [‘http’, ‘https’]