From d349e5014fc60a8ae140a56c457c3f3258959582 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 21 Oct 2024 09:57:10 -0300 Subject: Adding something Add reviewer data --- kodereviewer/data.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kodereviewer/data.py') diff --git a/kodereviewer/data.py b/kodereviewer/data.py index 8c4a0e6..61f1a01 100644 --- a/kodereviewer/data.py +++ b/kodereviewer/data.py @@ -106,6 +106,7 @@ class PullRequest(QObject): _user: User _assignee: User | None + _reviewers: list[User] _labels: list[Label] _last_commit: str @@ -134,6 +135,10 @@ class PullRequest(QObject): if data['assignee'] is not None: self._assignee = User(data['assignee']) + self._reviewers = [ + User(user) for user in data['assignees'] + ] + self._labels = [Label(label) for label in data['labels']] self._last_commit = data['head']['sha'] @@ -186,6 +191,10 @@ class PullRequest(QObject): def username(self) -> str: return self._user.username + @Property(str, constant=True) + def reviewers(self) -> list[User]: + return self._reviewers + @Property(str, constant=True) def last_commit(self) -> str: return self._last_commit -- cgit v1.2.3-70-g09d2