DEV Community

Cassidy Williams
Cassidy Williams

Posted on • Originally published at cassidoo.co on

Fighting open source spam with interaction limits

Hey y’all!

I’m starting my latest Blogvent series, where I write a useful blog post each day in December! I haven’t done this in a couple years now, so it’ll be a good exercise. Let’s boogie!

Oh no, spam!

Something I ran into recently is spam in some of my open source repositories. My repos aren’t massive, but even just a little spam can seem overwhelming, whether it’s someone making a bunch of issues, or random accounts making pull requests, or random people reviewing existing PRs, or just a lot of spammy comments.

Yes, you can report the things that might be popping up, but if it’s not just one account doing it, then it can feel like you’re just stuck watching the numbers get bigger.

Moderation to the rescue!

Luckily, I learned that there’s moderation settings you can enable in your GitHub repositories (or in your account overall) that can help you!

In your GitHub profile settings, under Moderation, you can go to Blocked Users, Interaction Limits, or Code Review Limits to restrict which users can interact with you and your public repos (“interact” meaning commenting, opening issues, creating pull requests, or approving/requesting changes across pull requests).

You can say that you want this to be just for a day, a week, all the way up to 6 months! Blocking an account though is permanent until you unblock them.

This is a great way to protect your open source repositories across your account without having to make them permanently inaccessible.

If you want to do this just in one repository in particular, you can! Go to your repository settings under Moderation options and you’ll find the same settings as before.

Phew.

Now you can have a nice cool down period and write code to your heart’s content.

See you tomorrow!

Top comments (0)