Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

github-comment-floodgate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-comment-floodgate

A GitHub Action that automatically locks issues if they get flooded with comments.

latest
Source
npmnpm
Version
2.1.2
Version published
Maintainers
1
Created
Source

GitHub Comment Floodgate

For maintainers of open-source projects that get high amounts of comment traffic.

This is a GitHub Action that automatically locks issues if they get flooded with comments beyond a certain threshold rate. It was inspired by keithamus/probot-flood.

Purpose

If you manage an open-source project, you may be aware that “centithreads” might suddenly occur in the course of mere hours. These centithreads would be very difficult for almost everyone to keep up with. Oftentimes they are triggered by heated, emotional debate that might break your project’s code of conduct.

Chances are that you are an unpaid volunteer in that open-source project, with your own family and your own separate day job. You might try your best to read every message and piece of feedback that comes through, but when a hundred (often lengthy) messages might suddenly occur every day, it’s simply not possible to keep up.

The bot just would automatically force a cooldown until a volunteer moderator like you can come look at stuff and ensure everything is okay, possibly with a warning or some message-hiding. This temporary cooldown can keep tempers and conduct from spiraling out of control. If the volunteer moderator finds that the thread is actually doing fine and okay, then they can unlock it. And, in the meantime, people can take a break from the high-traffic issue.

Of course, there’s a risk of this accidentally triggering when people are having rapid but good-faith conversations. If this happens, you could adjust the bot’s trigger threshold. But having a temporary cooldown after an intense commenting session (like an hour of one new message every five minutes) probably wouldn’t be such a bad thing, even then.

Usage

Create a .github/workflows/floodgate.yml file and enter something like this:

name: floodgate
on: issue_comment
jobs:
  floodgate:
    runs-on: ubuntu-latest
    steps:
    - uses: js-choi/github-comment-floodgate@v2
      with:
        # Sixty minutes is the default period.
        minutes-in-period: 60
        # Twelve comments per issue is the default maximum.
        max-comments-per-period: 12

See action.yml for documentation on this action’s input parameters.

Edits and deletions of existing comments do not count as new comments.

Keywords

GitHub

FAQs

Package last updated on 26 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts