Source code for bridge.core.github_latest_release

"""
Auto-generated Pydantic models for the GitHub latest release schema.
Do not edit this file manually — it is generated by `scripts/gen_models.py`
from the JSON schema at schemas/github_latest_release.json.
"""

# generated by datamodel-codegen:
#   filename:  github_latest_release.json
#   timestamp: 2025-11-04T16:20:15+00:00

from __future__ import annotations

from enum import Enum

from pydantic import AnyUrl, AwareDatetime, BaseModel, Field


[docs] class Author(BaseModel): name: str | None = None email: str | None = None login: str = Field(..., examples=["octocat"]) id: int = Field(..., examples=[1]) node_id: str = Field(..., examples=["MDQ6VXNlcjE="]) avatar_url: AnyUrl = Field(..., examples=["https://github.com/images/error/octocat_happy.gif"]) gravatar_id: str | None = Field(..., examples=["41d064eb2195891e12d0413f63227ea7"]) url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat"]) html_url: AnyUrl = Field(..., examples=["https://github.com/octocat"]) followers_url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat/followers"]) following_url: str = Field(..., examples=["https://api.github.com/users/octocat/following{/other_user}"]) gists_url: str = Field(..., examples=["https://api.github.com/users/octocat/gists{/gist_id}"]) starred_url: str = Field(..., examples=["https://api.github.com/users/octocat/starred{/owner}{/repo}"]) subscriptions_url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat/subscriptions"]) organizations_url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat/orgs"]) repos_url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat/repos"]) events_url: str = Field(..., examples=["https://api.github.com/users/octocat/events{/privacy}"]) received_events_url: AnyUrl = Field(..., examples=["https://api.github.com/users/octocat/received_events"]) type: str = Field(..., examples=["User"]) site_admin: bool starred_at: str | None = Field(None, examples=['"2020-07-09T00:17:55Z"']) user_view_type: str | None = Field(None, examples=["public"])
[docs] class State(Enum): uploaded = "uploaded" open = "open"
Uploader = Author
[docs] class Asset(BaseModel): url: AnyUrl browser_download_url: AnyUrl id: int node_id: str name: str = Field(..., description="The file name of the asset.", examples=["Team Environment"]) label: str | None = None state: State = Field(..., description="State of the release asset.") content_type: str size: int digest: str | None = None download_count: int created_at: AwareDatetime updated_at: AwareDatetime uploader: Uploader | None = None
[docs] class Reactions(BaseModel): url: AnyUrl total_count: int field_1: int = Field(..., alias="+1") field_1_1: int = Field(..., alias="-1") laugh: int confused: int heart: int hooray: int eyes: int rocket: int
[docs] class Release(BaseModel): url: AnyUrl html_url: AnyUrl assets_url: AnyUrl upload_url: str tarball_url: AnyUrl | None = None zipball_url: AnyUrl | None = None id: int node_id: str tag_name: str = Field(..., description="The name of the tag.", examples=["v1.0.0"]) target_commitish: str = Field( ..., description="Specifies the commitish value that determines where the Git tag is created from.", examples=["master"], ) name: str | None = None body: str | None = None draft: bool = Field( ..., description="true to create a draft (unpublished) release, false to create a published one.", examples=[False], ) prerelease: bool = Field( ..., description="Whether to identify the release as a prerelease or a full release.", examples=[False] ) immutable: bool | None = Field(None, description="Whether or not the release is immutable.", examples=[False]) created_at: AwareDatetime published_at: AwareDatetime | None = None updated_at: AwareDatetime | None = None author: Author = Field(..., description="A GitHub user.", title="Simple User") assets: list[Asset] body_html: str | None = None body_text: str | None = None mentions_count: int | None = None discussion_url: AnyUrl | None = Field(None, description="The URL of the release discussion.") reactions: Reactions | None = Field(None, title="Reaction Rollup")