diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d099d31..ebf432d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,3 +77,16 @@ jobs: with: args: > -Dsonar.qualitygate.wait=false + + - name: Notify OpenClaw for Review + if: success() + run: | + curl -s -X POST "https://openclaw.soludev.tech/hooks/agent" \ + -H "Authorization: Bearer ${{ secrets.OPENCLAW_WEBHOOK_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{ + "message": "CI terminée pour PR \"${{ github.event.pull_request.title }}\" - ${{ github.event.pull_request.html_url }}. Fais une review du code de la PR. Analyse les changements, ensuite poste un commentaire de review sur la PR. Donne un score de 1 à 10 pour la qualité du code, et suggère des améliorations si nécessaire.", + "deliver": true, + "channel": "telegram", + "to": "1988394825" + }' diff --git a/src/config.py b/src/config.py index 0529c90..74cfd7c 100644 --- a/src/config.py +++ b/src/config.py @@ -22,6 +22,7 @@ class Settings(BaseSettings): host: str = "0.0.0.0" port: int = 8000 log_level: str = "INFO" + allowed_origins: list[str] = ["http://localhost:8080"] tracing: TracingSettings = TracingSettings() minio_endpoint: str = "localhost:9040" diff --git a/src/main.py b/src/main.py index 01d2d2c..5127c47 100644 --- a/src/main.py +++ b/src/main.py @@ -124,7 +124,7 @@ async def lifespan(_app: FastAPI): app.add_middleware( CORSMiddleware, - allow_origins=["http://localhost:8030"], + allow_origins=settings.allowed_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"],