https://github.com/trahulsingh/green-squares-bot
π A GitHub Actions-powered bot that commits automatically on weekdays to keep your contribution graph active β great for learning CI/CD, Git automation, and workflow scheduling.
https://github.com/trahulsingh/green-squares-bot
automation bot ci-cd commit-bot contributions cron daily-commit devops github-actions github-workflows green-squares learning-project open-source python scheduling workflow
Last synced: 2 months ago
JSON representation
π A GitHub Actions-powered bot that commits automatically on weekdays to keep your contribution graph active β great for learning CI/CD, Git automation, and workflow scheduling.
- Host: GitHub
- URL: https://github.com/trahulsingh/green-squares-bot
- Owner: TRahulsingh
- License: mit
- Created: 2025-06-28T10:31:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-05T12:38:08.000Z (12 months ago)
- Last Synced: 2025-07-05T13:57:53.498Z (12 months ago)
- Topics: automation, bot, ci-cd, commit-bot, contributions, cron, daily-commit, devops, github-actions, github-workflows, green-squares, learning-project, open-source, python, scheduling, workflow
- Language: Python
- Homepage:
- Size: 113 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# πΏ green-squares-bot
> **A fun and educational GitHub Actions bot that automatically commits on weekdays to keep your contribution graph active.**

---
## π‘ What is `green-squares-bot`?
Welcome to **green-squares-bot** β a simple yet creative bot that automatically generates commits to make your GitHub contribution graph colorful and active π±.
This is a **demo project** that showcases how you can use **GitHub Actions** to automate routine tasks, like generating commits on a schedule. Itβs a great way to explore GitHub automation, scheduled workflows (via CRON), and Git operations β all within a lightweight and transparent project.
---
## β¨ Key Features
- π **Automated Commits on 3β5 Random Days per Week**
Each week, the bot picks 3 to 5 random days (including weekends) to commit.
- π’ **Multiple Commits per Day**
Generates between **3 to 15 commits** on each commit day, with natural variation.
- π **Runs Three Times Daily**
Scheduled runs spread throughout the day (Morning, Afternoon, Evening) to simulate organic activity.
- π§ **Human-like Commit Messages and Quotes**
Uses randomly selected inspirational quotes and emojis to simulate real development habits.
- π **Commit History Logging**
Logs all commits in `commit_log.txt` for transparency and tracking.
- π§ͺ **Educational Use Only**
Designed as a learning tool for GitHub Actions, automation, and CI/CD workflows.
---
## βοΈ How It Works
This project uses a `commit.py` Python script executed through a scheduled GitHub Actions workflow (`.github/workflows/activity.yml`).
The workflow runs daily at three times:
- π
**Morning:** `06:00 UTC` (11:30 AM IST)
- π **Afternoon:** `12:00 UTC` (5:30 PM IST)
- π **Evening:** `15:45 UTC` (9:15 PM IST)
Each run performs:
1. π§Ύ Git checkout
2. βοΈ Git identity setup
3. π² Weekly randomization of 3β5 commit days
4. βοΈ Running `commit.py` to generate 3β15 commits on commit days
5. ποΈ Updating random files with quotes and messages
6. π Pull latest changes with rebase
7. π€ Push commits if ahead
---
## π Getting Started
### Clone the repo:
```bash
git clone https://github.com/YOUR_USERNAME/green-squares-bot.git
cd green-squares-bot
```
### Push to your own GitHub repository:
```bash
git remote rename origin old-origin
git remote add origin https://github.com/YOUR_USERNAME/green-squares-bot.git
git push -u origin master
```
Make sure the repository is **public** so commits show up on your GitHub profile contribution graph!
---
## π§ File Structure
```
green-squares-bot/
βββ commit.py # Main commit generator script
βββ daily_log.txt # Rotating dummy file
βββ progress.md # Rotating dummy file
βββ inspiration.txt # Rotating dummy file
βββ commit_log.txt # Records commit history
βββ .github/
βββ workflows/
βββ activity.yml # GitHub Actions workflow
```
---
## π€ Contributing
Contributions are welcome! π
If you have ideas for:
- Better commit logic
- Cool new features
- Code cleanup or optimization
Feel free to fork this repo and open a pull request.
---
## β οΈ **Disclaimer**
> **This project is for educational and demonstration purposes only.**
> It is designed to show how GitHub Actions can be used for scheduled automation tasks β not for inflating contributions or misleading viewers.
Automating your GitHub activity can be a **fun and informative** way to learn about CI/CD, bots, scripting, and workflows β but it's important to use this responsibly:
- Be **transparent** in your usage
- Avoid **spammy or misleading behavior**
- Present it clearly as a **testbed for learning automation**
---
π§ͺ Built for learning, not for production.
π Happy green squares!
π
Automation starts from: `2025-07-01`
---
## π License
This project is licensed under the [MIT License](LICENSE).
Feel free to use, modify, and distribute it for learning and personal projects.
See the full license in the [LICENSE](LICENSE) file.