Update webhook server code and requirements files
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
fastapi>=0.111.0
|
fastapi>=0.111.0
|
||||||
uvicorn>=0.23.2
|
uvicorn>=0.23.2
|
||||||
httpx>=0.27.0
|
httpx>=0.27.0
|
||||||
PyGithub>=2.3.0
|
PyGithub>=2.3.0
|
||||||
|
python-dotenv>=1.0.1
|
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
@@ -13,39 +15,7 @@ import httpx
|
|||||||
from fastapi import FastAPI, Header, HTTPException, Request
|
from fastapi import FastAPI, Header, HTTPException, Request
|
||||||
from fastapi.responses import JSONResponse, PlainTextResponse
|
from fastapi.responses import JSONResponse, PlainTextResponse
|
||||||
from github import Github, Auth
|
from github import Github, Auth
|
||||||
#
|
|
||||||
# .env contents (with keys obscured))
|
|
||||||
#
|
|
||||||
# WEBHOOK_SECRET=xxxxxxxxxxxxxxxxxxx
|
|
||||||
# LOG_LEVEL=INFO
|
|
||||||
|
|
||||||
# # GitHub (set GITHUB_DRY_RUN=true during early tests to avoid PR writes)
|
|
||||||
# GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
# GITHUB_DRY_RUN=false
|
|
||||||
|
|
||||||
# # Bugzilla base
|
|
||||||
# BUGZILLA_BASE_URL=https://bugs.koozali.org
|
|
||||||
# BUGZILLA_PRODUCT=SME Server 11.x
|
|
||||||
# BUGZILLA_VERSION=11.beta1
|
|
||||||
# BUGZILLA_COMPONENT_DEFAULT=Github PR
|
|
||||||
|
|
||||||
# # Auth: prefer API key
|
|
||||||
# BUGZILLA_AUTH_MODE=api_key
|
|
||||||
# BUGZILLA_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
|
|
||||||
# # (or JSON-RPC login if no API key)
|
|
||||||
# # BUGZILLA_AUTH_MODE=basic
|
|
||||||
# BUGZILLA_USER=githubpr
|
|
||||||
# # BUGZILLA_PASSWORD=your_password
|
|
||||||
|
|
||||||
# # Behavior
|
|
||||||
# BUGZILLA_ATTACH_DIFF=true
|
|
||||||
# STATE_PATH=/home/githubpr/app/webhook/state/webhook_state.sqlite
|
|
||||||
# GITEA_BASE_URL=https://src.koozali.org
|
|
||||||
# GITEA_ORG=smeserver
|
|
||||||
# BUGZILLA_CC_ENABLE=true
|
|
||||||
# BUGZILLA_CC_ALLOW_NOREPLY=false
|
|
||||||
#
|
|
||||||
# ---------------- Logging (UTC) ----------------
|
# ---------------- Logging (UTC) ----------------
|
||||||
|
|
||||||
class UTCFormatter(logging.Formatter):
|
class UTCFormatter(logging.Formatter):
|
||||||
|
Reference in New Issue
Block a user