This integration receives GitHub webhook events, processes them, and sends a summarized message to a Telex channel via its webhook. It is built using FastAPI and is designed as an Output integration according to the Telex integration documentation.
- Modular Codebase: Organized into separate modules for configuration, GitHub utilities, and Telex utilities.
- Signature Verification: Verifies GitHub webhook signatures using HMAC SHA256.
- Dynamic Event Handling: Extracts usernames and creates Telex payloads for multiple GitHub event types (e.g., push, pull_request, issues).
- Asynchronous Processing: Uses FastAPI's background tasks to forward messages to Telex without delaying webhook responses.
- Robust Logging: Provides informative logging for debugging and error tracking.
- Python 3.8+
- FastAPI
- Uvicorn
- httpx
- pydantic
- python-dotenv
- pytest (for testing)
-
Clone the Repository:
git clone https://github.com/telex_integrations/github-telex-integration.git cd github-telex-integration
2. **Create a Virtual Environment:**
```bash
python3 -m venv venv
source venv/bin/activate
-
Install the Required Packages:
pip install -r requirements.txt
## Configuration
1. **Create a `.env` File:**
```bash
touch .env
-
Add the Required Environment Variables:
GITHUB_WEBHOOK_SECRET=your_github_webhook_secret TELEX_WEBHOOK_URL=your_telex_webhook_url
-
Run the Application:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
-
Run the Tests:
pytest test.py
Deploy the integration to your chosen hosting provider (e.g., Render, Heroku, AWS). Ensure your deployed URL is publicly accessible. Once deployed, update your GitHub webhook configuration to point to the deployed URL (e.g., https://your-deployed-app.com/webhook).
Include screenshots that demonstrate the following: