Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07b540f

Browse files
✨ add webhook receive url
1 parent d4cac53 commit 07b540f

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

‎gitlab_webhooks/urls.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from django.urls import path
22

3-
from . import views
3+
from .views import WebhookView
44

55
urlpatterns = [
6-
path("health_check/", views.health_check_view, name="health_check"),
7-
path("app_version/", views.app_version_view, name="app_version"),
6+
path("receive/", WebhookView.as_view(), name="receive"),
87
]

‎tests/test_urls.py‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import pytest
21
from django.urls import resolve, reverse
32

43

5-
@pytest.mark.parametrize(
6-
"namespace, url",
7-
[
8-
pytest.param("health_check", "/health_check/", id="health_check"),
9-
pytest.param("app_version", "/app_version/", id="app_version"),
10-
],
11-
)
12-
def test_urls(namespace, url):
4+
def test_receive_url():
5+
namespace = "receive"
6+
url = "/receive/"
7+
138
assert reverse(namespace) == url
149
assert resolve(url).view_name == namespace

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /