summaryrefslogtreecommitdiff
path: root/kodereviewer/data.py
diff options
context:
space:
mode:
authorMatias Linares <matias@deprecated.org>2024-10-21 09:57:10 -0300
committerMatias Linares <matias@deprecated.org>2024-10-21 10:07:17 -0300
commitd349e5014fc60a8ae140a56c457c3f3258959582 (patch)
tree062e51d749e40cdafb36299fd8376c0d0302291a /kodereviewer/data.py
parentbbe83e74b2c1335a0a726c2f993bb2d8c47ffedc (diff)
downloadkodereviewer-d349e5014fc60a8ae140a56c457c3f3258959582.tar.gz
Adding something
Add reviewer data
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