github-pull-shark
v1.0.0
Published
Automatically create and merge pull requests to earn the GitHub Pull Shark achievement
Maintainers
Readme
GitHub Pull Shark Achievement Generator
Automatically create and merge pull requests to earn the GitHub Pull Shark achievement on your profile. The Pull Shark achievement is awarded to users who have had multiple pull requests merged.

Installation
# Install globally
npm install -g github-pull-shark
# Or install locally in your project
npm install github-pull-sharkRequirements
- A GitHub Personal Access Token (PAT)
- A GitHub repository that you own (or have write access to)
Getting a GitHub Personal Access Token
- Visit GitHub's token settings
- Click "Generate new token" (classic)
- Give it a descriptive name (e.g., "Pull Shark Generator")
- Select the following permissions:
repo(Full control of private repositories)- Or at minimum:
public_repo(if only using with public repositories)
- Click "Generate token"
- Important: Copy your token immediately as you won't be able to see it again!
Usage
Command Line Interface (CLI)
You can run the tool directly from the command line:
# Run with interactive prompts
github-pull-shark
# Or provide all options as arguments
github-pull-shark --token YOUR_GITHUB_TOKEN --username YOUR_USERNAME --repo YOUR_REPO --number 4CLI Options
-t, --token <token>- Your GitHub personal access token-u, --username <username>- Your GitHub username-r, --repo <repository>- Target repository name-n, --number <number>- Number of pull requests to create (default: 1)--non-interactive- Run without interactive prompts-V, --version- Output the version number-h, --help- Display help information
Environment Variables
You can also set the following environment variables:
GITHUB_TOKEN=your_github_token
GITHUB_USERNAME=your_username
TARGET_REPO=your_repositoryCreate a .env file in your project directory with these variables.
Programmatic Usage
You can also use the package programmatically in your JavaScript code:
const PullShark = require('github-pull-shark')
const config = {
token: 'YOUR_GITHUB_TOKEN',
owner: 'YOUR_USERNAME',
repo: 'YOUR_REPOSITORY',
numPullRequests: 4, // Number of PRs to create
}
const pullShark = new PullShark(config)
pullShark.validate()
pullShark
.run()
.then(() => console.log('Done!'))
.catch((error) => console.error(`Error: ${error.message}`))Best Practices
- Create a dedicated repository for this tool to avoid cluttering your main repos
- GitHub may have rate limits or abuse detection, so don't create too many PRs at once
- The Pull Shark achievement typically requires at least 2 merged pull requests, but creating 4 is recommended to ensure you receive it
Troubleshooting
Token Permissions
If you're getting authentication errors, make sure your token has the correct permissions as listed above.
Repository Access
Make sure you're using a repository that you own or have write access to.
Rate Limiting
If you hit GitHub's rate limits, try creating fewer PRs or wait a while before trying again.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Created with ❤️ by Muhammad Danial
If you found this package helpful, please consider ⭐ starring our GitHub repository!
