- Notifications
You must be signed in to change notification settings - Fork0
📢 GitHub Repository Monitor | A sleek Telegram bot that keeps you instantly updated on your GitHub repositories' activity. Never miss a PR, issue, or release again! Built with Go, featuring PostgreSQL persistence, customizable notification intervals, and multi-account monitoring. Simple to deploy with Docker, powerful to use.
License
erkineren/repository-monitor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A Telegram bot that monitors your GitHub repositories and sends notifications about:
- Pull Requests
- Issues
- Releases
repository-monitor/├── cmd/│ └── monitor/│ └── main.go # Application entry point├── internal/│ ├── bot/│ │ ├── handler.go # Telegram bot command handlers│ │ └── telegram.go # Telegram bot implementation│ ├── github/│ │ ├── client.go # GitHub client│ │ └── notifications.go # GitHub notifications logic│ ├── models/│ │ ├── account.go # GitHub account model│ │ ├── notification.go # Notification models│ │ └── user.go # User model│ ├── store/│ │ ├── postgres/│ │ │ └── store.go # PostgreSQL implementation│ │ └── store.go # Store interface│ └── config/│ └── config.go # Configuration management├── .env.example # Example environment variables├── docker-compose.yml # Docker Compose configuration├── Dockerfile # Docker build configuration└── README.md # This file
- Monitor multiple GitHub accounts
- Receive notifications for:
- New or updated Pull Requests
- New or updated Issues
- New Releases
- Toggle notifications per GitHub account
- Configurable notification intervals
- Persistent storage using PostgreSQL
- Go 1.19 or higher
- PostgreSQL database
- Telegram bot token (get it from@BotFather)
Copy.env.example
to.env
and configure the following variables:
TELEGRAM_TOKEN
: Your Telegram bot tokenPOSTGRES_URL
: PostgreSQL connection URLRENOTIFY_INTERVAL
: Hours to wait before re-notifying about the same item (default: 24)NOTIFY_INTERVAL
: Minutes between GitHub checks (default: 5)POLLING_TIMEOUT
: Seconds for Telegram long polling timeout (default: 60)DEBUG
: Enable debug logging (default: false)
- Configure environment variables in
.env
- Run with Docker Compose:
docker-compose up -d
Clone the repository:
git clone https://github.com/erkineren/repository-monitor.gitcd repository-monitor
Install dependencies:
go mod download
Configure environment variables in
.env
Run the application:
go run cmd/monitor/main.go
/start
- Show welcome message and available commands/add <username> <token>
- Add a GitHub account to monitor/remove <username>
- Remove a GitHub account/toggle <username>
- Toggle notifications for a GitHub account/list
- List monitored GitHub accounts/help
- Show help message
The project follows standard Go project layout and best practices:
- Code is organized into packages by functionality
- Dependencies are managed with Go modules
- Configuration is handled through environment variables
- Business logic is separated from infrastructure concerns
- Interfaces are used for dependency injection and testing
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Run tests to ensure everything works
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
If you discover a security vulnerability within this project, please send an email toerkineren@gmail.com. All security vulnerabilities will be promptly addressed.
This project is licensed under the MIT License - see theLICENSE file for details.
About
📢 GitHub Repository Monitor | A sleek Telegram bot that keeps you instantly updated on your GitHub repositories' activity. Never miss a PR, issue, or release again! Built with Go, featuring PostgreSQL persistence, customizable notification intervals, and multi-account monitoring. Simple to deploy with Docker, powerful to use.