Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from fastapi import FastAPI
from src.routers.github import github_router
from src.routers.health import health_router
from starlette.middleware.cors import CORSMiddleware

Expand All @@ -23,5 +24,6 @@ def create_app() -> FastAPI:
allow_origins=[str(origin) for origin in ServerConfig.CORS_ORIGINS],
)
app.include_router(health_router, prefix="/health")
app.include_router(github_router, prefix="/webhook/github")

return app
1 change: 1 addition & 0 deletions src/routers/github/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from src.routers.github.routes import router as github_router
12 changes: 12 additions & 0 deletions src/routers/github/routes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import Dict

from fastapi import APIRouter


router = APIRouter()


@router.post("/")
async def webhook() -> Dict[str, str]:
"""Webhook for GitHub endpoint"""
return {"status": "ok"}