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

snowball-slackbot

v1.1.5

Published

Send reminder messages to Slack users about GitHub PRs that require review, changes, or are approved.

Downloads

5

Readme

What is this?

Snowball is a Slackbot that will periodically send reminder messages to designated users in specified GitHub organizations about:

  • pull requests that they have been asked to review
  • changes requested by reviewers on a pull request (sent to PR author)
  • approved pull requests that have not been merged (sent to PR author)

The inspiration behind this project came from an engineering team retrospective at the project author's company (Phido.io) in which team members expressed that these types of reminders get lost in email. A decision was made that a Slackbot would offer a better delivery system for such reminders.

It is a revamp of an existing library, but implemented with JavaScript Promises.

Its character and avatar are based off the eponymous dog in the animated series Rick and Morty.

Link to GitHub: snowball-slackbot

Installation

  • Clone this repo (if not using npm) then npm i, see section on execution after the rest of these setup steps
  • If using npm, npmi -g snowball-slackbot

Additional Setup

  • Create a config file in your local home directory named .ghslackuser with mappings of your org's GitHub users and their corresponding Slack usernames like:{ "l337hackerGH": "slackerelite" }
  • Create a config file in your local home directory named ~/.ghslackids with a mapping of your org's GitHub user names to their corresponding Slack user IDs like: { "l337hackerGH": "U4ZAQH555" }
    • Here's a quick way to get your org's Slack user IDs that you want to include: https://stackoverflow.com/questions/40940327/what-is-the-simplest-way-to-find-a-slack-team-id-and-a-channel-id
  • Set up a new bot in your org's Slack account
    • Go to https://YOUR-ORG.slack.com/apps/manage/custom-integrations
    • You will get an API token for your bot. Save this in your .bashrc or .bash_profile as REMINDER_TOKEN. This is required for the bot to connect to your Slack acount.
    • You can name your bot whatever you want and use this library but for the sake of some fun easter eggs, I'd recommend sticking with snowball and using this avatar.
  • Set up a GitHub API token. Save this in your .bashrc or .bash_profile as GITHUB_TOKEN. This is required for the bot to read from your GitHub orgs and repositories.
  • Save a comma separated list of GitHub orgs you want the bot to monitor as ORGANIZATIONS in your .bashrc or .bash_profile.

Options

This bot will operate by default between 10AM and 6PM local time, Monday through Friday, on a 2 hour interval.

  • Change work hours by modifying the values of the workStart and workEnd variables on lines 13 & 14 of snowball.js.
  • Save a custom integer value for GITHUB_SLACK_REMINDER_INTERVAL in your .bashrc or .bash_profile if you don't want to use the default value of 2 (hours).

Usage

You need Node 8+

If you've cloned this repo directly off of Github:

  • From the root folder of the repo: cd lib/ && node index.js

If you've installed this as an npm module, just run snowball in your terminal

Slack Commands

You can use the following commands with the bot running in Slack:

  • snowball-snooze if you want to shut off reminders for the rest of the workday. Reminders will resume the next day.
  • snowball-resume if you want to resume getting reminders.
  • snowball-fetch to get on demand reminders. If you have no reminders pending, this command won't do anything (you won't get a message back).

Contact me if you have setup problems. Report any bugs you find. Feel free to comment on requests for additional features or contribute to this project. I'm a product manager and not full on programmer by trade so contributions, refactors, etc are more than welcome!