DEV Community

Ashan_Dev
Ashan_Dev

Posted on

🦈 Pull Shark Automation: Create 62 GitHub PRs/min with Python

What Is Pull Shark Automation?

Ever wanted to earn the GitHub Pull Shark badge β€” or stress-test your CI/CD pipelines by generating hundreds of pull requests automatically? Meet Pull Shark Automation, an open-source Python framework built for exactly that.

⚠️ Disclaimer: This tool is for educational purposes only. Use responsibly and in accordance with GitHub's Terms of Service.

GitHub's Pull Shark badge is awarded when your PRs get merged β€” Default (2 PRs), Bronze (16), Silver (128), and Gold (1024). Doing that manually is tedious. Doing it at 62 PRs/minute? That's automation.


✨ Key Features

  • Dual execution modes β€” Sequential (stable) and Parallel (blazing fast, async)
  • Multi-token rotation β€” Automatically switches GitHub tokens to stay within rate limits
  • Proxy support β€” Built-in proxy scraping and rotation from free sources
  • Auto-merge β€” PRs are created and merged without manual intervention
  • State persistence β€” Resume from interruptions via state.json
  • Real-time notifications β€” Discord & Slack webhook support
  • Windows compatible β€” Async operations work cross-platform

πŸ—οΈ Architecture Overview

The project is cleanly modularized:

main.py                    # Sequential mode entry point
parallel_automation.py     # Parallel/async mode
git_manager.py             # Git branch, commit, push
github_tool.py             # GitHub CLI wrapper + rate limiting
token_manager.py           # Multi-token rotation
proxy_manager.py           # Proxy scraping & rotation
notifier.py                # Discord & Slack webhooks
logger.py                  # Dual-output logging
Enter fullscreen mode Exit fullscreen mode

The high_performance/ package provides async-first versions of all the above for maximum throughput.


πŸš€ Quick Start

1. Clone & Install

git clone https://github.com/itxashancode/Pull-Shark-Automation.git
cd Pull-Shark-Automation
pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

2. Authenticate GitHub CLI

gh auth login
Enter fullscreen mode Exit fullscreen mode

3. Configure config.json

{
  "repo_path": ".",
  "base_branch": "main",
  "pr_count": 100,
  "delay_seconds": 30,
  "auto_merge": true,
  "dry_run": false,
  "max_concurrent": 10
}
Enter fullscreen mode Exit fullscreen mode

4. Run

# Sequential (reliable)
python main.py

# Parallel (fast)
python parallel_automation.py --count 100 --concurrent 10

# Dry run (test without commits)
python main.py --dry-run
Enter fullscreen mode Exit fullscreen mode

⚑ Performance Benchmarks

Mode Workers Tokens Speed Time for 1000 PRs
Sequential 1 1 ~2 PRs/min ~8 hours
Parallel 10 1 ~36 PRs/min ~28 min
Parallel 20 3 ~62 PRs/min ~16 min

With 3 GitHub tokens and 20 parallel workers, the tool hit 62.5 PRs/min in real-world testing.


πŸ”‘ Multi-Token Setup

Add multiple tokens to github_tokens.json for automatic rotation β€” each GitHub token supports 5,000 requests/hour, so 3 tokens gives you 15,000+/hour:

{
  "tokens": [
    { "name": "Primary", "token": "github_pat_..." },
    { "name": "Secondary", "token": "github_pat_..." },
    { "name": "Backup", "token": "github_pat_..." }
  ]
}
Enter fullscreen mode Exit fullscreen mode

The TokenManager automatically picks the token with the most remaining requests.


πŸ“’ Notifications

Set up Discord or Slack webhooks in config.json to receive live progress updates:

{
  "discord_webhook": "https://discord.com/api/webhooks/...",
  "slack_webhook": "https://hooks.slack.com/services/..."
}
Enter fullscreen mode Exit fullscreen mode

You'll get color-coded alerts for PR creation, merges, failures, and completion summaries.


πŸ† Earning Your Pull Shark Badge

Badge PRs Needed Recommended Command
Default 2 python main.py --count 5
Bronze 16 python main.py --count 20 --delay 15
Silver 128 python parallel_automation.py --count 150 --concurrent 15
Gold 1024 python parallel_automation.py --count 1024 --concurrent 20

πŸ”— Links


If you found this useful, drop a ⭐ on the repo and share with devs who love automation!

Have questions or feature ideas? Drop them in the comments below. πŸ‘‡

Top comments (0)