Skip to content

Commit

Permalink
app register callback
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Apr 14, 2024
1 parent 422ff5f commit ff4f738
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/routers/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def github_app_callback(code: str, installation_id: str, setup_action: str):
return { "success": success, "message": message }

@router.post("/app/webhook")
def github_app_webhook(request: Request, background_tasks: BackgroundTasks, x_github_event: str = Header(...)):
logger.info("github_app_webhook: x_github_event=%s, %s", x_github_event, request.json())
async def github_app_webhook(request: Request, background_tasks: BackgroundTasks, x_github_event: str = Header(...)):
payload = await request.body()
logger.info("github_app_webhook: x_github_event=%s, %s", x_github_event, payload)
return {"hello": "world"}

0 comments on commit ff4f738

Please sign in to comment.