A Telex integration that tracks GitHub repository commits and sends real-time notifications to your Telex channel. Built with Python, Flask, and Docker.
- 🔄 Real-time commit notifications
- 🔐 Secure webhook processing with signature verification
- 🎨 Customizable notification format
- 🚀 Easy integration with GitHub repositories
The integration uses:
- Flask for the webhook endpoint
- Gunicorn as the WSGI server
- GitHub Webhooks for commit tracking
- Heroku for hosting
- GitHub repository access
- Telex channel with webhook capability
- Heroku account
- Python 3.9+
Configure these environment variables in Heroku:
MY_GITHUB_SECRET=your_github_webhook_secret
CHANNEL_ID=your_telex_channel_id
APP_URL=https://your-app-name.herokuapp.com
-
Clone the Repository
git clone https://github.com/CynthiaWahome/github-commit-monitor cd github-commit-monitor
-
Deploy to Heroku
# Install Heroku CLI if you haven't already heroku create your-app-name heroku stack:set container git push heroku main
-
Configure Environment Variables
heroku config:set MY_GITHUB_SECRET=your_github_webhook_secret heroku config:set CHANNEL_ID=your_telex_channel_id heroku config:set APP_URL=https://your-app-name.herokuapp.com
- Go to your GitHub repository settings
- Navigate to Webhooks > Add webhook
- Configure webhook:
- Payload URL:
https://your-app-name.herokuapp.com/github-webhook
- Content type:
application/json
- Secret: Same as
MY_GITHUB_SECRET
- Events: Select "Just the push event"
- Payload URL:
- Get your Telex channel ID
- Add it to your Heroku config variables
- Test the connection:
curl -X POST https://your-app-name.herokuapp.com/github-webhook
Run the test suite:
python -m pytest --cov=app tests/ --cov-report=html
Key test areas:
- Webhook signature verification
- Payload processing
- Telex message formatting
- Error handling
POST /github-webhook
: Receives GitHub commitsGET /integration.json
: Integration metadataGET /health
: Health check endpoint
Common issues:
- 401 Unauthorized: Check GitHub secret in Heroku config
- 404 Not Found: Verify Heroku app URL
- Application Error: Check Heroku logs with
heroku logs --tail
- Fork the repository
- Create a feature branch
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for more details.
If you encounter any issues or have questions, please feel free to open an issue on our GitHub Issues page.
We welcome contributions! Please see our CONTRIBUTING guide for more details on how to get started.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.