express icon indicating copy to clipboard operation
express copied to clipboard

ci: detect Spam pull requests in GitHub Actions

Open aminya opened this issue 3 months ago • 6 comments

This adds a GitHub Action that for the new contributors checks if the PR has a meaningful description and doesn't contain the default text. Otherwise, they are detected as spam and are closed.

aminya avatar Feb 14 '24 11:02 aminya

This is remarkably petty but it's "rationale" not "rational".

MaffooBristol avatar Feb 14 '24 12:02 MaffooBristol

Hey @aminya, thanks for the PR. We I have been discussing this in #5449 and the consensus is we don't want an action for this if we can avoid it. We are still working on a few more important things for the project and will loop back around in that issue when we are ready. I just don't want you wasting your own time in this until we decide if an action is the right way to go.

wesleytodd avatar Feb 14 '24 14:02 wesleytodd

@ADTC I stand by my comment above. We have a few more important things we will be discussing in tomorrows TC meeting and after we sort that out we can start addressing these more directly.

wesleytodd avatar Feb 14 '24 16:02 wesleytodd

How about restricting README PRs to core maintainers only?

Steveantor avatar Feb 14 '24 18:02 Steveantor

How about restricting README PRs to core maintainers only?

I went through the spam PRs trying to determine a pattern. It's not always the same file. The misled students can pick any file at random. Most of the time, the commit made from GitHub interface is left in with the default subject line. But not always. Most of the time, it's one commit. But not always. The point is, we have to be careful how we identify spam to cover as much of it as possible, with as little false positives as possible.

ADTC avatar Feb 14 '24 19:02 ADTC

I would suggest separating the script from the workflow and creating an action to make the code more maintainable. Something like this: https://github.com/animesh-chouhan/github-spamstop/blob/main/index.js

Also the pull_request_template can be made more extensive if we are adopting it: https://github.com/animesh-chouhan/github-spamstop/blob/main/.github/pull_request_template.md

animesh-chouhan avatar Feb 15 '24 17:02 animesh-chouhan

Closing as we've decided not go to go this direction, see https://github.com/expressjs/express/issues/5449#issuecomment-2020666952

jonchurch avatar Mar 26 '24 15:03 jonchurch