Skip to content

Release

🛈 DocStrings

Model representing a repository release.

Source code in src/githarbor/core/models.py
@dataclass
class Release:
    """Model representing a repository release."""

    tag_name: str
    """Tag name for the release."""
    name: str
    """Name/title of the release."""
    description: str = ""
    """Description/body of the release."""
    created_at: datetime | None = None
    """Date and time when the release was created."""
    published_at: datetime | None = None
    """Date and time when the release was published."""
    draft: bool = False
    """Whether this is a draft release."""
    prerelease: bool = False
    """Whether this is a pre-release."""
    author: User | None = None
    """User who created the release."""
    assets: list[Asset] = field(default_factory=list)
    """List of assets attached to the release."""
    url: str | None = None
    """URL to view the release."""
    target_commitish: str | None = None
    """The branch/tag/commit the release targets."""
    download_count: int = 0
    """Total downloads."""

assets class-attribute instance-attribute

assets: list[Asset] = field(default_factory=list)

List of assets attached to the release.

author class-attribute instance-attribute

author: User | None = None

User who created the release.

created_at class-attribute instance-attribute

created_at: datetime | None = None

Date and time when the release was created.

description class-attribute instance-attribute

description: str = ''

Description/body of the release.

download_count class-attribute instance-attribute

download_count: int = 0

Total downloads.

draft class-attribute instance-attribute

draft: bool = False

Whether this is a draft release.

name instance-attribute

name: str

Name/title of the release.

prerelease class-attribute instance-attribute

prerelease: bool = False

Whether this is a pre-release.

published_at class-attribute instance-attribute

published_at: datetime | None = None

Date and time when the release was published.

tag_name instance-attribute

tag_name: str

Tag name for the release.

target_commitish class-attribute instance-attribute

target_commitish: str | None = None

The branch/tag/commit the release targets.

url class-attribute instance-attribute

url: str | None = None

URL to view the release.

:fa-brands-github: Show source on GitHub