Skip to content
saintberatPublic

About

Automated commit scheduler for PowerShell to keep GitHub contribution streaks active.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

96 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🟢 commit-O

An automated GitHub commit and activity scheduler designed for PowerShell. It helps maintain a consistent GitHub contribution streak by automating commits with randomized counts, realistic intervals, and seamless background execution via Windows Task Scheduler.


✨ Features

  • 🎲 Randomized Activity: Generates between 2 to 7 commits per execution to mimic natural commit patterns.
  • ⏱️ Realistic Delays: Random sleep intervals (5–30 seconds) between successive commits.
  • 🔑 Headless GitHub CLI Auth: Dynamically retrieves authentication tokens using gh auth token, eliminating Task Scheduler credential helper failures (could not read Username).
  • 🔄 Auto Rebase & Sync: Automatically runs git pull --rebase --autostash before committing to avoid push conflicts.
  • 📜 Full Transcript Logging: Generates runtime logs (auto-commit.log) without polluting git history.
  • 🛡️ Per-Commit Pushing: Pushes each commit immediately so contributions are synced even if the process is terminated early.

🚀 How It Works

  1. Changes directory to the script's root path.
  2. Initializes transcript logging to auto-commit.log.
  3. Injects a non-interactive Git credential helper backed by gh auth token.
  4. Pulls remote updates and pushes any pending local commits.
  5. Loops through a randomized commit count ($2 \le n \le 7$):
    • Appends a timestamped record to commit-log.txt.
    • Stages and commits changes with update: <timestamp>.
    • Pushes to the main branch.
    • Sleeps for a random duration ($5 - 30\text{ seconds}$) between iterations.

🛠️ Prerequisites

  • Windows 10 / 11 with PowerShell 5.1+ or PowerShell 7+
  • Git for Windows installed and available in PATH
  • GitHub CLI (gh) authenticated:
    gh auth login

⚙️ Setup with Windows Task Scheduler

To run the script automatically every day:

  1. Open Task Scheduler (taskschd.msc).
  2. Click Create Basic Task...
  3. Set the trigger to Daily and choose your preferred execution time.
  4. Set Action to Start a program:
    • Program/script: powershell.exe
    • Add arguments: -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Path\To\commit-O\auto-commit.ps1"
    • Start in: C:\Path\To\commit-O
  5. Finish and save the task.

📄 License

MIT License. Free to use and customize.

About

Automated commit scheduler for PowerShell to keep GitHub contribution streaks active.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages