Model representing a GitHub issue.
| 219 | |
| 220 | |
| 221 | class GitHubIssue(BaseModel): |
| 222 | """ |
| 223 | Model representing a GitHub issue. |
| 224 | """ |
| 225 | |
| 226 | number: int = Field( |
| 227 | description="Issue number" |
| 228 | ) |
| 229 | |
| 230 | title: str = Field( |
| 231 | description="Title of the issue" |
| 232 | ) |
| 233 | |
| 234 | body: Optional[str] = Field( |
| 235 | default=None, |
| 236 | description="Body content of the issue" |
| 237 | ) |
| 238 | |
| 239 | state: str = Field( |
| 240 | description="State of the issue (open or closed)" |
| 241 | ) |
| 242 | |
| 243 | created_at: str = Field( |
| 244 | description="When the issue was created (ISO 8601 format)" |
| 245 | ) |
| 246 | |
| 247 | updated_at: str = Field( |
| 248 | description="When the issue was last updated (ISO 8601 format)" |
| 249 | ) |
| 250 | |
| 251 | closed_at: Optional[str] = Field( |
| 252 | default=None, |
| 253 | description="When the issue was closed (ISO 8601 format)" |
| 254 | ) |
| 255 | |
| 256 | url: str = Field( |
| 257 | description="URL of the issue" |
| 258 | ) |
| 259 | |
| 260 | labels: List[str] = Field( |
| 261 | default_factory=list, |
| 262 | description="Labels applied to the issue" |
| 263 | ) |
| 264 | |
| 265 | assignees: List[str] = Field( |
| 266 | default_factory=list, |
| 267 | description="GitHub usernames assigned to the issue" |
| 268 | ) |
| 269 | |
| 270 | milestone: Optional[Dict[str, Any]] = Field( |
| 271 | default=None, |
| 272 | description="Milestone associated with the issue" |
| 273 | ) |
| 274 | |
| 275 | comments: Optional[int] = Field( |
| 276 | default=None, |
| 277 | description="Number of comments on the issue" |
| 278 | ) |
no test coverage detected