SmartUpdater is an intelligent dependency update scheduler that optimizes the timing and execution of dependency updates in GitHub repositories. By analyzing historical commit patterns, CI pipeline success rates, and repository activity, it determines the optimal windows for performing updates, reducing the risk of failed updates and minimizing disruption to development workflows.
Dependency updates are crucial for security and feature enhancements, but they often fail due to:
- Poor timing (e.g., during active development)
- Incompatible with current CI pipeline state
- Lack of historical success pattern analysis
- Manual scheduling leading to human error
SmartUpdater addresses these challenges by:
- Analyzing repository activity patterns to find quiet periods
- Tracking CI pipeline success rates to identify stable windows
- Automating the update process with intelligent scheduling
- Providing data-driven insights for update timing
- Creating pull requests with detailed update information
- Reduced Update Failures: By analyzing historical patterns and CI success rates, SmartUpdater significantly reduces the likelihood of failed updates.
- Time Optimization: Automatically identifies the best times for updates based on repository activity and CI pipeline health.
- Developer Productivity: Minimizes disruption to development workflows by scheduling updates during optimal periods.
- Security Enhancement: Ensures timely dependency updates while maintaining system stability.
- Data-Driven Decisions: Provides insights into update patterns and success rates for better decision-making.
- Enterprise Development: Manage dependency updates across multiple repositories with minimal disruption.
- Open Source Projects: Automate dependency maintenance while respecting contributor activity patterns.
- CI/CD Pipelines: Integrate with existing CI/CD workflows to optimize update timing.
- Security Teams: Ensure timely security updates while maintaining system stability.
- DevOps Teams: Reduce manual intervention in dependency management processes.
- GitHub API integration for repository monitoring
- Automated dependency update scheduling
- Pull request creation for dependency updates
- REST API for repository management
- PostgreSQL for data persistence
- Docker support for easy deployment
- Go 1.21 or higher
- PostgreSQL database
- GitHub API token
- Docker (optional, for containerization)
Create a .env file in the project root:
GITHUB_TOKEN=your_github_token
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=smartupdater
PORT=8080-
Install dependencies:
go mod download
-
Run database migrations:
go run cmd/migrate/main.go
-
Start the server:
go run cmd/server/main.go
- Build and start the containers:
docker-compose up --build
smartupdater/
├── cmd/
│ ├── migrate/ # Database migration tool
│ └── server/ # Main application server
├── internal/
│ ├── api/ # REST API handlers
│ ├── config/ # Configuration management
│ ├── models/ # Database models
│ └── services/ # Core business logic
├── Dockerfile # Container definition
└── docker-compose.yml # Container orchestration
GET /repositories- List all repositoriesPOST /repositories- Add a new repositoryGET /repositories/{id}- Get repository detailsPUT /repositories/{id}- Update repository settingsDELETE /repositories/{id}- Remove a repositoryGET /repositories/{id}/updates- List update history
This project is licensed under the MIT License.