summaryrefslogtreecommitdiff
path: root/kodereviewer/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'kodereviewer/data.py')
-rw-r--r--kodereviewer/data.py9
1 files changed, 9 insertions, 0 deletions
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']
@@ -187,6 +192,10 @@ class PullRequest(QObject):
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