Spaces:
Sleeping
Sleeping
File size: 693 Bytes
ce673e5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | from pydantic import BaseModel, Field, ConfigDict
from typing import Optional
from datetime import datetime, timezone
import uuid
class Issue(BaseModel):
model_config = ConfigDict(extra="ignore")
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
githubIssueId: int
number: int
title: str
body: Optional[str] = ""
authorName: str
repoId: str
repoName: str
owner: Optional[str] = "" # Repository owner username
repo: Optional[str] = "" # Repository name
htmlUrl: Optional[str] = "" # GitHub issue URL
state: str = "open"
isPR: bool = False
createdAt: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
|