1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
"""Work items in a project.
https://docs.microsoft.com/en-gb/rest/api/azure/devops/wit/work-items/list?view=azure-devops-rest-7.2-preview
"""
from dataclasses import dataclass
from datetime import datetime
from typing import Any
from uuid import UUID
from . import ListResult
@dataclass
class WorkItemAvatar:
"""Work item avatar."""
href: str
@dataclass
class WorkItemLinks:
"""Work item links."""
avatar: WorkItemAvatar
@dataclass
class WorkItemUser:
"""Work item user."""
display_name: str
url: str
id: UUID
unique_name: Any
image_url: Any
descriptor: str
links: WorkItemLinks | None = None
@dataclass
class WorkItemFields:
"""Azure DevOps work item fields."""
area_path: str
team_project: str
iteration_path: str
work_item_type: str
state: str
reason: str
assigned_to: WorkItemUser | None
created_date: datetime
created_by: WorkItemUser | None
changed_date: datetime
changed_by: WorkItemUser | None
comment_count: int
title: str
microsoft_vsts_common_state_change_date: datetime
microsoft_vsts_common_priority: int
@dataclass
class WorkItem:
"""Azure DevOps work item."""
id: int
rev: int
fields: WorkItemFields
url: str
type WorkItemsResult = ListResult[WorkItem]
|