Code Monkey home page Code Monkey logo

spamtoberfest's Introduction

Spamtoberfest logo

Spamtoberfest ☠️

What is it

This project was created in order to fight against spammers who are rotting what Hacktoberfest was created for.

This project consists of two parts:

  • One part to list users who spam
  • A part to provide those who wish to do so with a GitHub Action to automatically clean their repositories, based on the list of spammers.

You can either flag some suspicious PRs or directly close and flag them if the author is recorded into the spammers list (in addition, it will not be taken into account for the Hacktoberfest achievements).

How to add somebody to the spammers list?

  1. Open an issue with the dedicated issue template and fill the required fields
  2. Somebody will take a look at your issue and will push it or not to the repo's blacklist

The philosophy, why no PRs?

Any issue doesn't open a PR. We only direct-push to the repo to not "cheat" over the Hacktoberfest event.

I would like to avoid that contributing to the list to preserve our projects and our time becomes a PR race.

And so what?

We hope this list, when completed with some spammers who don't care that much about the wonderful open source world, will help some maintainers to waste less time closing useless PRs opened by idiots that just want a t-shirt without caring about what they contribute.

Add the Spamtoberfest Action to your repository

In order to use the Action, you need to add a workflow to your project.

Create Workflow

Create a workflow (eg: .github/workflows/spamtoberfest.yml see Creating a Workflow file) to utilize the spamtoberfest action with content:

name: Pull Request Spamtoberfest checker

on:
  pull_request:
    types: [opened]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Spamtoberfest
        uses: maximelafarie/spamtoberfest@main
        with:
          action-type: close # default is flag
          repo-token: ${{ secrets.GITHUB_TOKEN }}

You also can take a look at our workflow demo file.

Note: This grants access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API

Inputs

Various inputs are defined in action.yml to let you configure Spamtoberfest:

Name Description Default
repo-token Token to use to authorize label changes. Typically the GITHUB_TOKEN secret N/A
action-type The action to be taken in case of a positive test. Possible values are flag (adds a "Spam" label to the PR) and close (adds a "Spam" label to the PR and closes it). flag

Contributing

You want to make the script even faster, the model more sexy? Any real contribution to the repo (not on the blacklist) should be made with a PR as you would do for a standard GitHub project. More info on the CONTRIBUTING.md file. 😉

npm run start:dev

Starts the application in development using nodemon and ts-node to do hot reloading.

npm run build

Builds the app at build, cleaning the folder first.

npm run start

Starts the app in production by first building the project with npm run build, and then executing the compiled JavaScript at build/index.js.

Screenshots

Automatic labelling

Automatic closing

spamtoberfest's People

Contributors

kylef000 avatar maximelafarie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spamtoberfest's Issues

Add score-based spam detection besides blacklist

  • I'm submitting a ...
    [ ] spammer report
    [ ] bug report
    [X] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

It seems that this tool is only a simple blacklist - but I think some kind of negative scoring system may be introduced.

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I believe we can score PRs negatively (and positively) and mark as spam if a defined threshold is met. For example some things deducting score may be:

  • Changes only in text files (.md, .html).
  • Changes only in one file (or removal a single file),
  • Changes only in one line,
  • Changes consisting of words "awesome" or "amazing" ;) (aka: blacklisting words in commits messages and diffs themselves),
  • Empty descriptions,
  • "patch-1" as a name of remote branch.

Of course, it's not the best solution, as it won't be 100% bulletproof, but what do you think?

Extract the blacklist from the action itself

  • I'm submitting a ...
    [ ] spammer report
    [ ] bug report
    [X] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project
  • Summary
    At the moment the blacklist is build into the Action itself, wouldn't it be better if the list was seperate and dynamically retrieved? This would also allow for a custom blacklist in repositories which might be blacklisted for a different reason.

I would like to use your list on merge-chance.info

Hi, thanks a lot for making this project happen!
I am working on merge-chance.info (https://github.com/PiotrZakrzewski/merge-chance) and struggle with spam PRs skewing heavily results for some of the more popular projects, like Vuejs for instance.

I would like to use your blacklist directly in my project. As of now the easiest way to do it seems to copy it and to add it verbatim, checking every now and then to update it.

Please let me know if you have more thoughts on that (or objections).

Add PR comment checker

  • I'm submitting a ...
    [ ] spammer report
    [ ] bug report
    [x] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

There is an action that allows forcing using a certain PR template:
https://github.com/Talentia-Software-OSS/check-pr-comments-action

The spammers usually do not follow the template. This can be used as a logic for spam detection.

It would be nice to merge that repository into spamtoberfest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.