Add gerrit owner information to status.json
gerrit.query does return the owner information, we can save that
in the Change object and serialize it to status.json
Change-Id: Ib505ef8703bc60058d2775f522fcc3d02910b05f
diff --git a/zuul/model.py b/zuul/model.py
index b03bbb0..67ce8be 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -709,6 +709,10 @@
ret['project'] = changeish.project.name
ret['enqueue_time'] = int(self.enqueue_time * 1000)
ret['jobs'] = []
+ if hasattr(changeish, 'owner'):
+ ret['owner'] = changeish.owner
+ else:
+ ret['owner'] = None
max_remaining = 0
for job in self.pipeline.getJobs(changeish):
now = time.time()
@@ -857,6 +861,7 @@
self.approvals = []
self.open = None
self.status = None
+ self.owner = None
def _id(self):
return '%s,%s' % (self.number, self.patchset)
diff --git a/zuul/trigger/gerrit.py b/zuul/trigger/gerrit.py
index 6966488..bf591c4 100644
--- a/zuul/trigger/gerrit.py
+++ b/zuul/trigger/gerrit.py
@@ -371,6 +371,7 @@
change.approvals = data['currentPatchSet'].get('approvals', [])
change.open = data['open']
change.status = data['status']
+ change.owner = data['owner']
if change.is_merged:
# This change is merged, so we don't need to look any further