Fix the rendering of item entries

Ensure that both the change and patchset attributes of zuul.items
are strings to avoid encoding unecessary assumptions about their
types.

Also, return the patchset value in the patchset field, instead of
the change.

Change-Id: I2fd89b4b43edc42a38316b67de07227df7f2399a
This commit is contained in:
James E. Blair 2017-07-21 15:05:00 -07:00
parent e3db295493
commit 3e4a72db8b
1 changed files with 2 additions and 2 deletions

View File

@ -183,9 +183,9 @@ class ExecutorClient(object):
canonical_hostname=i.change.project.canonical_hostname,
canonical_name=i.change.project.canonical_name)
if hasattr(i.change, 'number'):
d['change'] = i.change.number
d['change'] = str(i.change.number)
if hasattr(i.change, 'patchset'):
d['patchset'] = i.change.number
d['patchset'] = str(i.change.patchset)
if hasattr(i.change, 'branch'):
d['branch'] = i.change.branch
zuul_params['items'].append(d)