Skip to content

michaelachrisco/anti-mass-follow-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Bot Blocker

A Python script to detect and block mass-following bot accounts from your GitHub profile. This script is designed to run daily via GitHub Actions.


Features

  • Scans your followers
  • Detects accounts following over a threshold (default: 4000)
  • Blocks suspected bots
  • Automates daily cleanup using GitHub Actions

Setup

1. Clone the Repo

git clone https://github.com/michaelachrisco/anti-mass-follow-bot.git
cd block-github-bots

2. Set Up GitHub Token

  • Go to GitHub Developer Settings
  • Create a token with the following scopes:
    • read:user
    • user:follow
  • Save this token as a GitHub Secret named GH_TOKEN

3. Update GitHub Actions Workflow

  • Edit .github/workflows/bot-blocker.yml
  • Replace your-github-username with your actual GitHub username

Running Manually

You can also run the script locally:

export GITHUB_USERNAME=your-username
export GH_TOKEN=your-token
python main.py

Example first run:

Scanning followers of @michaelachrisco...
Found 182 followers.
Neustradamus is a suspected bot. Blocking...
Blocked Neustradamus
...
LinuxJS is a suspected bot. Blocking...
Blocked LinuxJS

Automation via GitHub Actions

This project includes a workflow that runs daily at 2 AM UTC to:

  • Fetch followers
  • Identify suspected bots
  • Block them automatically

You can trigger the workflow manually via the GitHub Actions tab as well.


License

GPL3.0


Fork me!

Feel free to fork! If you do, make sure you add in the token credentials detailed on #2 and you will have your very own script running at 2 AM blocking accounts with over 5000 followers. Enjoy!

About

Removes (blocks) mass follow bots from GitHub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages