summaryrefslogtreecommitdiff
path: root/kodereviewer/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'kodereviewer/data.py')
-rw-r--r--kodereviewer/data.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kodereviewer/data.py b/kodereviewer/data.py
index 0d1bef6..8c4a0e6 100644
--- a/kodereviewer/data.py
+++ b/kodereviewer/data.py
@@ -108,6 +108,8 @@ class PullRequest(QObject):
_assignee: User | None
_labels: list[Label]
+ _last_commit: str
+
_comments: list[Comment]
_files: list[ChangedFile]
@@ -134,6 +136,8 @@ class PullRequest(QObject):
self._labels = [Label(label) for label in data['labels']]
+ self._last_commit = data['head']['sha']
+
# At first this is empty until it's updated with a request
self._comments = []
self._files = []
@@ -182,6 +186,10 @@ class PullRequest(QObject):
def username(self) -> str:
return self._user.username
+ @Property(str, constant=True)
+ def last_commit(self) -> str:
+ return self._last_commit
+
@Property(list, constant=True)
def labels(self) -> list[Label]:
return self._labels