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

cathy

v1.1.0

Published

npm module to make comments on GitHub pull requests

Downloads

3

Readme

Latest (recommended) npm latest version

Beta: npm beta version

Alpha: npm alpha version

cathy

npm module to make comments on GitHub pull requests.

Goals of this project

  • Minimal dependencies. This module is meant to be a dependency of your projects like GitHub Actions. Be small for quick install and security reasons.
  • Typescript and Javascript support with officially supported Typescript bindings.

Getting started

  • Install module in project:
npm install --save cathy
  • Authenticate with GitHub and make a comment!
import cathy from "cathy"

cathy.speak("### 👋 Hello! 👋", {
  // **Required** options parameters
  //
  // Personal access token for GitHub account you want to make comment for.
  // Create token here: https://github.com/settings/tokens
  githubToken: "XXXXXXXXXXXXXX",
  // GitHub repository that we want to make the comment for.
  githubRepo: "username/repo",
  // Issue/pull request number to comment on.
  githubIssue: 12,

  // **Optional** parameters
  // Update existing comment you have sent on this pull request
  updateExisting: false,
  // Identifier used for updating a comment. Cathy updates the existing comment with the provided ID.
  // You only want to change this value if you are trying to use cathy to send multiple unique comments.
  // Example: You use cathy on pull requests to print the status of test coverage *and* a website preview.
  // You would set `updateID` to `testCoverage` and `websitePreview`. If you keep `default` for both,
  // cathy would first comment on a PR for test coverage and then overwrite that comment with the website
  // preview message. Therefore, you would never see the test coverage menu.
  updateID: "default"
})

Contributors

Thanks goes to these wonderful people (emoji key)

Contributing

Development setup

  • npm install
  • Write your code.
  • Run tests to test your code works.

Run tests

Tests for this project perform real HTTP requests against the GitHub API. Being a small project that doesn't require constant development, this is ok at this time to do.

This means that in order to run tests on your local development environment, you need to follow these steps:

  • Create a personal GitHub access token that the tests will run against that user.
  • Run GITHUB_TOKEN=XXX npm test. Or, make a draft pull request to this repository and the tests will run automatically.

Credits

  • Thank you to this project for the inspiration behind this project. I loved the project, but wanted to add the functionality to my own GitHub Actions which was the original inspiration of this project.