Merge "Add change message to Zuul vars in inventory"
This commit is contained in:
commit
a1283f403f
|
@ -525,6 +525,10 @@ are available:
|
|||
E.g., `https://review.example.org/#/c/123456/` or
|
||||
`https://github.com/example/example/pull/1234`.
|
||||
|
||||
.. var:: message
|
||||
|
||||
The commit or pull request message of the change.
|
||||
|
||||
Branch Items
|
||||
~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class TestInventory(TestInventoryBase):
|
|||
self.assertIn('src_root', z_vars['executor'])
|
||||
self.assertIn('job', z_vars)
|
||||
self.assertEqual(z_vars['job'], 'single-inventory')
|
||||
self.assertEqual(z_vars['message'], 'A')
|
||||
|
||||
self.executor_server.release()
|
||||
self.waitUntilSettled()
|
||||
|
|
|
@ -175,6 +175,8 @@ class ExecutorClient(object):
|
|||
zuul_params['change_url'] = item.change.url
|
||||
if hasattr(item.change, 'patchset'):
|
||||
zuul_params['patchset'] = str(item.change.patchset)
|
||||
if hasattr(item.change, 'message'):
|
||||
zuul_params['message'] = item.change.message
|
||||
if (hasattr(item.change, 'oldrev') and item.change.oldrev
|
||||
and item.change.oldrev != '0' * 40):
|
||||
zuul_params['oldrev'] = item.change.oldrev
|
||||
|
|
Loading…
Reference in New Issue