Skip to content

Comment

🛈 DocStrings

Source code in src/githarbor/core/models.py
@dataclass
class Comment:
    id: str
    """Unique identifier for the comment."""
    body: str
    """Content of the comment."""
    author: User
    """User who wrote the comment."""
    created_at: datetime
    """Date and time when the comment was created."""
    updated_at: datetime | None = None
    """Date and time when the comment was last updated."""
    reactions: dict[str, int] = field(default_factory=dict)
    """Dictionary of reaction types and their counts."""
    reply_to: str | None = None  # ID of parent comment if this is a reply
    """ID of parent comment if this is a reply."""
    url: str | None = None
    """URL to the comment."""

author instance-attribute

author: User

User who wrote the comment.

body instance-attribute

body: str

Content of the comment.

created_at instance-attribute

created_at: datetime

Date and time when the comment was created.

id instance-attribute

id: str

Unique identifier for the comment.

reactions class-attribute instance-attribute

reactions: dict[str, int] = field(default_factory=dict)

Dictionary of reaction types and their counts.

reply_to class-attribute instance-attribute

reply_to: str | None = None

ID of parent comment if this is a reply.

updated_at class-attribute instance-attribute

updated_at: datetime | None = None

Date and time when the comment was last updated.

url class-attribute instance-attribute

url: str | None = None

URL to the comment.

:fa-brands-github: Show source on GitHub