guardcat

1.0.0 • Public • Published

Build Status XO code style Coverage Status

GuardCat

GitHub notifications can be overwhelming. I watch a lot of repos and would like to get notifications only for repos that match a given pattern. So let me introduce you to GuardCat – a simple helper utility to query the GitHub API recursively for particular patterns (and possibly more options later).

A cat watching the Octocat

Side note: This utility is mainly used to build a CLI tool and web app with it.

Getting started

$ npm i --save guardcat
const guardCat = require( 'guardcat' );
 
guardCat.run( {
  // your GitHub access token
  // -> https://github.com/settings/tokens
  token : '234567890',
  // patterns for notifications repos (uses minimatch)
  // -> everything that works there is possible here, too
  repoPatterns : [ 'stefanjudis/*', 'tc39/ecma262' ]
} ).then( notification => {
  // notifications only matching one of the patterns
  console.log( notification );
} );

guardCat.run( options )

Get all GitHub notifications for repos matching the patterns.

Parameters:

  • options.token {string} (required)
  • options.repoPatterns {array} (required)

Returns: {Promise}

Readme

Keywords

Package Sidebar

Install

npm i guardcat

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • stefanjudis