mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
Add a new launch_type of 'webhook'
This commit is contained in:
@@ -144,6 +144,7 @@ class WebhookReceiverBase(APIView):
|
||||
|
||||
kwargs = {
|
||||
'_eager_fields': {
|
||||
'launch_type': 'webhook',
|
||||
'webhook_service': obj.webhook_service,
|
||||
'webhook_credential': obj.webhook_credential,
|
||||
'webhook_guid': event_guid,
|
||||
|
||||
@@ -41,4 +41,9 @@ class Migration(migrations.Migration):
|
||||
name='webhook_service',
|
||||
field=models.CharField(blank=True, choices=[('github', 'Github'), ('gitlab', 'Gitlab')], max_length=16),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='unifiedjob',
|
||||
name='launch_type',
|
||||
field=models.CharField(choices=[('manual', 'Manual'), ('relaunch', 'Relaunch'), ('callback', 'Callback'), ('scheduled', 'Scheduled'), ('dependency', 'Dependency'), ('workflow', 'Workflow'), ('webhook', 'Webhook'), ('sync', 'Sync'), ('scm', 'SCM Update')], db_index=True, default='manual', editable=False, max_length=20),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -532,6 +532,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
('scheduled', _('Scheduled')), # Job was started from a schedule.
|
||||
('dependency', _('Dependency')), # Job was started as a dependency of another job.
|
||||
('workflow', _('Workflow')), # Job was started from a workflow job.
|
||||
('webhook', _('Webhook')), # Job was started from a webhook event.
|
||||
('sync', _('Sync')), # Job was started from a project sync.
|
||||
('scm', _('SCM Update')) # Job was created as an Inventory SCM sync.
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user