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

webhookup

v1.0.2

Published

github webhooks library & cli

Downloads

6

Readme

webhookup

setup webhooks quickly for your GitHub/GHE projects.

JavaScript Style Guide semantic-release Greenkeeper badge

usage

npx webhookup [options]. you can also npm install -g webhookup or yarn global add webhookup

configuration

webhookup can be configured through the CLI or the environment. my preference is to set a few env vars and simply run webhookup in the current project to setup my most commonly used webhook, then override it only as needed with the CLI.

env

a common env config could be:

export WEBHOOK_GITHUB_TOKEN=<TOKEN>
export WEBHOOK_ENDPOINT=https://<WEBHOOK_HOST>/payload
export WEBHOOK_SECRET=<HOOK_SECRET>
export WEBHOOK_EVENTS=status,pull_request # https://developer.github.com/webhooks/#events
# export GITHUB_ENDPOINT # assume api.github.com
# export GITHUB_OWNER # let the cli discover it from your project
# export GITHUB_REPOSITORY # let the cli discover it from your project

then cd /my/project && webhookup. please tread with caution putting secrets in your env.

cli

you can provide and/or squash any settings from the CLI:

$ webhookup --help
  github webhooks library & cli

  Usage
    $ webhookup [options]

  Options

  --github, -g or env GITHUB_ENDPOINT. defaults to github.com's api
  --owner, -o or env GITHUB_OWNER. repo owner/org. if none provided, tries to read owner from working directory
  --repository, -r or env GITHUB_REPOSITORY. repo name. if none provided, tries to read from working directory
  --token, -t or env WEBHOOK_GITHUB_TOKEN or GITHUB_TOKEN. github api token. must provide admin:repo_hook permission
  --endpoint, -h or env WEBHOOK_ENDPOINT. url to the origin (host:<port>) where your webhook listener lives
  --secret, -s or env WEBHOOK_SECRET. github webhook secret. your hook service uses this secret to verify that request is legitimate.
  --events, -e or env WEBHOOK_EVENTS. csv list of events. e.g. `status,push`
  --purge, -p delete all webhooks for repo.

  Examples
    # minimal, if you configure your env for everything
    $ webhookup

    # pragmatic option 1, specify just events, cd to your github/.git enabled project,
    # use your env for the rest
    $ webhookup -e status,push

    # pragmatic option 2, if your PWD is a github & .git enabled project
    $ webhookup -t <token> -h my.webhook.host.com -s <super-secret> -e status,push

    # ignore PWD, specify org & repo
    $ webhookup -o cdaringe -r webhookup

tokens

your github token must provide admin:repo_hook permission. you can visit https://github.com/settings/tokens/new to create new github API tokens.