A modern, automated GitHub Pull Request management tool with a beautiful GUI interface. This bot automatically creates, manages, and merges pull requests based on your configuration.
- 🎨 Modern GUI Interface - Beautiful, user-friendly interface built with Tkinter
- 🔄 Automated Workflow - Automatically creates and merges PRs from dev → main
- 📝 Smart Content Generation - Generates realistic PR titles and descriptions
- 🔁 Continuous Loop Mode - Run continuously with configurable intervals
- 📊 Real-time Activity Logs - Color-coded logs with emoji indicators
- ⚙️ Flexible Configuration - Customize branches, intervals, and repository settings
- 🔐 Secure Token Handling - Password-masked token input
- Python 3.8+
- GitHub Personal Access Token (classic) with
reposcope - requests library (automatically installed via requirements.txt)
-
Clone the repository:
git clone https://github.com/yourusername/Auto-PR-bot-v1.0.git cd Auto-PR-bot-v1.0 -
Install dependencies:
pip install -r requirements.txt
Launch the GUI:
python app.pyThe modern interface will guide you through the configuration process.
-
Configure Repository Settings:
- 🔑 GitHub Token: Your Personal Access Token
- 👤 Repository Owner: GitHub username or organization
- 📦 Repository Name: Name of your repository
- 🌿 Base Branch: Target branch (default:
main) - 🔀 Head Branch: Source branch (default:
dev) - ⏱️ Interval: Loop interval in seconds (default: 60)
-
Choose Operation Mode:
▶️ Run Once: Execute a single cycle- 🔄 Start Loop: Run continuously at specified intervals
- ⏹️ Stop Loop: Stop the continuous loop
- 🗑️ Clear Logs: Clear the activity log display
You can also use the bot programmatically:
from src.bot import AutoPRBot
# Create bot instance
bot = AutoPRBot(
token="ghp_your_token_here",
repo="owner/repository",
base_branch="main",
head_branch="dev"
)
# Run once
bot.run_once()
# Or run in a loop (60 second intervals)
# bot.run_loop(60)Auto-PR-bot-v1.0/
├── app.py # Application entry point
├── requirements.txt # Python dependencies
├── README.md # This file
├── .gitignore # Git ignore rules
└── src/
├── __init__.py # Package initialization
├── bot.py # Core bot logic
├── config.py # Configuration management
└── ui.py # Modern GUI interface
The bot follows a simple workflow:
- Branch Validation - Ensures the head branch exists (creates if needed)
- Content Update - Updates README.md on the head branch with generated content
- PR Check - Checks for existing open PRs
- PR Creation - Creates a new PR if differences exist
- Auto-Merge - Automatically merges the PR
- Loop - Optionally repeats at specified intervals
- Automated Testing - Continuously test your PR workflow
- Demo & Training - Demonstrate Git/GitHub workflows
- CI/CD Testing - Test continuous integration pipelines
- Repository Maintenance - Automated routine updates
- Go to GitHub.com → Settings → Developer settings
- Select Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Give it a descriptive name
- Select scopes: ✓ repo (Full control of private repositories)
- Click Generate token
- Copy the token (you won't see it again!)
- ✅ Never commit tokens to version control
- ✅ Use environment variables or secure vaults for tokens
- ✅ Grant minimum required permissions
- ✅ Rotate tokens regularly
- ✅ Use tokens with limited scope for public repositories
"Validation Failed: No commits between branches"
- No differences exist between the branches
- The bot will skip PR creation
"404 Not Found"
- Check repository owner/name spelling
- Verify token has correct permissions
- Ensure branches exist
"Failed to merge PR"
- Branch protection rules may prevent auto-merge
- Check if PR requires reviews
- Verify merge permissions
API Rate Limits
- Increase the loop interval
- GitHub has rate limits: 5,000 requests/hour for authenticated users
- ✅ Success / Completed
- ❌ Error / Failed
⚠️ Warning- ℹ️ Information
- 🤖 Bot Activity
- 🔀 Merge Operation
- 📋 Check Operation
- 📝 Create Operation
- ⏱️ Wait/Timing
- 🔄 Loop Activity
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python and Tkinter
- Uses GitHub REST API
- Inspired by modern DevOps automation practices
If you encounter any issues or have questions, please open an issue on GitHub.
Made with ❤️ by the Auto PR Bot Team