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": { "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" ], "definitions": { "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" ] } } }
- Fields:
-
field check_suite:
GitHubCheckSuiteId
[Required]# Brief information about the check suite.
-
field conclusion:
Optional
[GitHubCheckRunConclusion
] = None# Conclusion status, if completed.
-
field html_url:
HttpUrl
[Required]# URL of the check run webpage.
- Constraints:
minLength = 1
maxLength = 2083
format = uri
-
field output:
Optional
[GitHubCheckRunOutput
] = 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:
minLength = 1
maxLength = 2083
format = uri