Add schedule info from summary fields to allowed notification content.

This commit is contained in:
Bill Nottingham
2020-12-14 16:42:28 -05:00
committed by Jim Ladd
parent 47de2ddcb5
commit 7b757f17a9
2 changed files with 9 additions and 0 deletions

View File

@@ -280,6 +280,7 @@ class JobNotificationMixin(object):
{'unified_job_template': ['id', 'name', 'description', 'unified_job_type']},
{'instance_group': ['name', 'id']},
{'created_by': ['id', 'username', 'first_name', 'last_name']},
{'schedule': ['id', 'name', 'description', 'next_run']},
{'labels': ['count', 'results']}]}]
@classmethod
@@ -344,6 +345,10 @@ class JobNotificationMixin(object):
'name': 'Stub project',
'scm_type': 'git',
'status': 'successful'},
'schedule': {'description': 'Sample schedule',
'id': 42,
'name': 'Stub schedule',
'next_run': '2038-01-01T00:00:00Z'},
'unified_job_template': {'description': 'Sample unified job template description',
'id': 39,
'name': 'Stub Job Template',

View File

@@ -72,6 +72,10 @@ class TestJobNotificationMixin(object):
'name': str,
'scm_type': str,
'status': str},
'schedule': {'description': str,
'id': int,
'name': str,
'next_run': str},
'unified_job_template': {'description': str,
'id': int,
'name': str,