Add Gitea webhook endpoint for push events

This commit is contained in:
igny8
2025-11-09 10:55:08 +00:00
parent a05bc4f151
commit d880314def
2 changed files with 81 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ URL patterns for system module.
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import AIPromptViewSet, AuthorProfileViewSet, StrategyViewSet, system_status, get_request_metrics
from .views import AIPromptViewSet, AuthorProfileViewSet, StrategyViewSet, system_status, get_request_metrics, gitea_webhook
from .integration_views import IntegrationSettingsViewSet
from .settings_views import (
SystemSettingsViewSet, AccountSettingsViewSet, UserSettingsViewSet,
@@ -51,6 +51,8 @@ urlpatterns = [
path('status/', system_status, name='system-status'),
# Request metrics endpoint
path('request-metrics/<str:request_id>/', get_request_metrics, name='request-metrics'),
# Gitea webhook endpoint
path('webhook/', gitea_webhook, name='gitea-webhook'),
# Integration settings routes - exact match to reference plugin workflow
# IMPORTANT: More specific paths must come BEFORE less specific ones
# GET: Task progress - MUST come before other settings paths