Welcome to the GitHub Follower Bot Automated repository! This project is designed to help you automatically follow your GitHub followers, keeping your network growing and engaged with minimal effort.
✋✋✋You Follow Me ---> My Bot Follows you Back! Let's growth Together!✋✋🤘
🔵🔵🔵Let's also connect on LinkedIn
⭐⭐⭐⭐⭐ ---> Star the Repo!
The bot will fetch your list of followers and automatically follow any users that are not already followed.
A log of followed users is maintained in the followers.txt
file.
The bot will continue to run until all followers have been processed.
Additionally, the check_all_followers.py
script allows you to monitor how many followers you have and how many you can follow based on your current GitHub API rate limits.
The bot can be run in two ways:
- Manually: You can run the bot manually on your local machine.
- Automatically with GitHub Actions: Set up the bot to run automatically on a schedule using GitHub Actions.
GitHub_Follower_Bot_Automated/
│
├── bot.py # Main script for the bot.
├── check_all_followers.py # Script to check total followers and available follows.
├── followers.txt # File where followed users are logged.
├── follower_counter.txt # Total number of users followed across all runs.
├── requirements.txt # Python dependencies.
├── .env # Environment variables (must be created).
├── bot.log # Log file for bot.py activities.
├── check_all_followers.log # Log file for check_all_followers.py activities.
├── LICENSE # Project licensing information.
└── README.md # This readme file.
- Automated Follower Management: Automatically follows users who follow you on GitHub.
- User-Friendly: Easy to set up and run, even for those with minimal technical knowledge.
- Error Handling: Built-in error handling ensures smooth operation and reliability.
- Logging: Comprehensive logs for tracking bot activity and performance.
- Persistent Tracking: Maintains a persistent follower counter across multiple runs.
- Rate Limit Awareness: Monitors GitHub API rate limits to prevent exceeding them.
Clone this repository to your local machine:
git clone https://github.com/OfficialCodeVoyage/GitHub_Follower_Bot_Automated.git
cd GitHub_Follower_Bot_Automated
Install the required Python packages using pip:
pip install -r requirements.txt
Create a .env file in the project root and add your GitHub username and Personal Access Token:
GITHUB_USER=your_github_username
PERSONAL_GITHUB_TOKEN=your_personal_access_token
Make sure you do not commit this file to the repository as it contains sensitive information. Create .gitignore file and add .env to it.
Run the bot using the following command:
python follower_bot.py
To set up the bot to run automatically on a schedule using GitHub Actions, follow these steps:
- Go to GitHub Settings: Navigate to your GitHub profile, click on your avatar in the upper-right corner, and select "Settings".
- Access Developer Settings: On the left sidebar, click on "Developer settings"(all the way to bottom / last button). Under "Developer settings", click on "Personal access tokens".
- Generate a New Token: Click the "Generate new token" button. Give your token a descriptive name like "GitHub Follower Bot Token".
- Select the Required Scopes: Choose the following scopes:
repo
: Full control of private repositories.workflow
: Update GitHub Actions workflows.admin:repo_hook
: Manage webhooks and their events.public_repo
: Access to public repositories.read:user
: Read access to profile data.write:repo_hook
: Manage repository hooks.user
: Read and write access to profile information.gist
: Access to Gists (if needed).
- Generate and Save the Token: Click "Generate token" and copy the token immediately, as it will not be shown again.
- Navigate to Your Repository: Go to your repository on GitHub. Click on "Settings" in the repository menu.
- Add a New Secret: On the left sidebar, click on "Secrets and variables" under the "Security" section and select "Actions". Click "New repository secret".
- Name the secret
PERSONAL_GITHUB_TOKEN
: Paste the Personal Access Token you copied earlier into the "Secret" field and click "Add secret" to save it.
In your YAML file (e.g., automation.yml
), update the following:
- Token Reference: Ensure your workflow is referencing the token correctly:
env: GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- Script Name: Replace
bot.py
with your actual script name in therun
command:run: | python bot.py
- Dependencies: Make sure your
requirements.txt
is correct and that the path is correct if it's in a different directory. - Cron Schedule: Adjust the cron expression to control when the workflow runs automatically:
schedule: - cron: '0 0 * * *' # Modify as needed
- After setting up, monitor the workflow in the "Actions" tab of your repository to ensure it runs as expected.
- Commit and push the file to your repository.
Ensure that your workflow has the necessary permissions by adding this to your YAML file:
permissions:
contents: write # Allows committing and pushing changes
issues: write # Allows creating and managing issues
pull-requests: write # Allows managing pull requests
actions: write # Allows updating GitHub Actions workflows
- You can monitor the workflow runs in the "Actions" tab of your GitHub repository.
- The bot will run automatically based on the schedule you set or manually from the Actions tab.
GITHUB_USER
: Your GitHub username.PERSONAL_GITHUB_TOKEN
: Your GitHub Personal Access Token for API access.
Additional features can be implemented as needed. Check the Issues and Discussions sections for ideas and contributions.
Contributions are welcome! Feel free to submit a pull request or open an issue for suggestions, bug reports, or feature requests.
- Fork the repository.
- Create a new branch (
git checkout -b dev
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin dev
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or issues, please feel free to reach out via GitHub Issues or Discussions.