Hook in the webhook receiver views into the urlconf

This commit is contained in:
Jeff Bradberry
2019-08-06 16:00:59 -04:00
parent a7a99ed141
commit 8f97dbf781
4 changed files with 37 additions and 1 deletions

View File

@@ -137,6 +137,8 @@ v2_urls = [
url(r'^activity_stream/', include(activity_stream_urls)),
url(r'^workflow_approval_templates/', include(workflow_approval_template_urls)),
url(r'^workflow_approvals/', include(workflow_approval_urls)),
url(r'^(?P<model_kwarg>job_templates|workflow_job_templates)/(?P<pk>[0-9]+)/',
include('awx.api.urls.webhooks')),
]

14
awx/api/urls/webhooks.py Normal file
View File

@@ -0,0 +1,14 @@
from django.conf.urls import url
from awx.api.views import (
GithubWebhookReceiver,
GitlabWebhookReceiver,
BitbucketWebhookReceiver,
)
urlpatterns = [
url(r'^github/$', GithubWebhookReceiver.as_view(), name='webhook_receiver_github'),
url(r'^gitlab/$', GitlabWebhookReceiver.as_view(), name='webhook_receiver_gitlab'),
url(r'^bitbucket/$', BitbucketWebhookReceiver.as_view(), name='webhook_receiver_bitbucket'),
]