ajdlinux / PRBot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add spam label to PRs

JL2210 opened this issue · comments

People sometimes create spam PRs on repositories that use PRBot to get free T-shirts during Hacktoberfest. Can this project discourage that by adding the spam label to PRs?

I can totally see where you're coming from, though I'd caution against labelling everything as "spam" automatically - occasionally, as we've observed with the kernel mirror, there are legitimate new contributors who simply didn't read the instructions and it's not very nice to autolabel their attempted contributions as spam. Your projects might be different, but if the numbers are small I would think it's better to just occasionally monitor the queue for spam.

Also it's pushing the scope of PRBot - I wrote PRBot primarily for the purpose of being able to autoreply to PRs on read-only mirror repositories where I don't have contributor or admin rights (i.e. torvalds/linux). Applying labels to a PR requires contributor privileges - if you're happy to coordinate with the people in your project who do have admin rights, the recommended approach to deploying a bot on GitHub is to use GitHub Apps or Webhooks, and there are existing frameworks out there which will allow you to do that very easily. I'd strongly recommend doing things in the GitHub recommended way rather than the method I chose to get around a problem that most projects don't have.