npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-comment-floodgate

v2.1.2

Published

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

Downloads

5

Readme

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.