Skip to content

[Repository] Limit/prevent spam issues/PRs #2258

Open
@GuillaumeDua

Description

@GuillaumeDua

Motivation

  • Limit/constraint the amount of new irrelevant issues and PRs
  • Thus avoid unnecessary notifications and emails received by the ~2k watchers of this repository
  • Yet ensure the solution won't be an impediment for legit contributors

Context

Roughly checking on:

Some recurring characteristics emerge:

  • The account user was just created
  • Short issue/PR name: most likely, a single word
    • contributor name, possibly shortened
    • generic ("Git", "practice", "projects", "Cpp", "ccc", "Hello World", "Hi", "Halo", etc.)
  • Short issue/PR body
  • The issue/PR is the first one of this user, ever.
  • There's no previous nor further activity on the user's account.

And sometimes:

  • The contributor name is composed like <some_indian_name>_?\d+, but this cannot constitute a criterion in any way.

Suggested solutions

Turn on moderation settings

Disable blank issue/PR template

From my perspective, a (bunch of) dedicated template issue/PRs with many non-empty fields are a good way to avoid unnecessary issues and/or PRs.

Add a dedicated anti-spam github-action

Such a github-action would perform several checks, as acceptance criteria.

Technically it could rely on actions/github-script@v7 (and octokit) to use the github rest API.

The repo's example here automatically add a comment to PR created by new contributors.

We can then implement other criterions, as the one listed in the Context section above.

What if the checks does not pass ?

  • Either add a dedicated label suspicious to the issue or PR.
  • Or immediately rejects the issue/PR by closing it,
    possibly adding an automated comment describing the reason, and pointing to the "how to contribute" guideline.

Additional thoughts

  • Either solution might make the spammers always find new ways to meet such acceptance criterias and keep on spamming, over and over again ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions