Skip to content

Commit f5da42f

Browse files
committed
feat: add get links shortcut
1 parent 402488a commit f5da42f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

yatracker/types/full_issue.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
__all__ = ["FullIssue"]
44

5-
65
from datetime import datetime
6+
from typing import TYPE_CHECKING
77

88
from .base import Base, field
99
from .comment import Comment
@@ -16,6 +16,9 @@
1616
from .transitions import Transitions
1717
from .user import User
1818

19+
if TYPE_CHECKING:
20+
from .issue_link import IssueLink
21+
1922

2023
class FullIssue(Base, kw_only=True):
2124
url: str = field(name="self")
@@ -72,3 +75,7 @@ async def get_comments(self) -> list[Comment]:
7275
async def post_comment(self, text: str, **kwargs) -> Comment:
7376
"""Post comment for self."""
7477
return await self._tracker.post_comment(self.id, text=text, **kwargs)
78+
79+
async def get_links(self) -> list[IssueLink]:
80+
"""Get issue links."""
81+
return await self._tracker.get_issue_links(self.id)

0 commit comments

Comments
 (0)