https://github.com/stefanjudis/guardcat
A utility to help you keep track of github notifications
https://github.com/stefanjudis/guardcat
github github-api
Last synced: 10 months ago
JSON representation
A utility to help you keep track of github notifications
- Host: GitHub
- URL: https://github.com/stefanjudis/guardcat
- Owner: stefanjudis
- License: mit
- Created: 2016-12-21T18:44:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T22:50:15.000Z (over 8 years ago)
- Last Synced: 2025-03-19T20:48:25.055Z (10 months ago)
- Topics: github, github-api
- Language: JavaScript
- Homepage:
- Size: 71.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/stefanjudis/guardcat) [](https://github.com/sindresorhus/xo) [](https://coveralls.io/github/stefanjudis/guardcat?branch=master)
# 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).

*Side note: This utility is mainly used to build a CLI tool and web app with it.*
## Getting started
```
$ npm i --save guardcat
```
```javascript
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}`