0.0.1 • Published 5 years ago
watch-gh-repos v0.0.1
watch-gh-repos
Watch, unwatch, or ignore GitHub repositories
This tool allows you to automatically set the 'Watch this repo' command, normally done through the GitHub.com user interface, programmatically, either from your CLI or from your JavaScript code. This is ideal in cases where you have dozens of repos to watch or unwatch, and don't want to cycle through everything to find them.
Install
> npm i watch-gh-reposUsage
const watchGhRepos = require('watch-gh-repos')
watchGHRepos({'watch': 'RichardLitt/watch-gh-repos', 'token': someToken})
 .then((res) => {
   console.log(res) // Watch all the things!
 })Options
- -g,- --getGet repo watching details
- -i,- --ignoreIgnore notifications from a repository
- -o,- --orgSpecify all repositories from an organization or user
- -r,- --ratelimitSkip checks making sure GitHub repo is valid (Skips 1 hit per repo)
- -t,- --tokenA Personal Access Token for GitHub. You need scopes- notificationsand- repos.
- -u,- --unwatchUnwatch instead of watch
- -w,- --watchSpecify a repo
CLI
You will need a token. You can pass this token in through the command line using the --token flag, or by setting it in your env as WATCH_GH_REPOS. This token needs the scopes notifications and repos to be enabled.
Install
npm i -g watch-gh-reposUsage
Usage
  $ watch-gh-repos <input> [opts]
Options
  -g, --get Get repo watching details
  -i, --ignore Ignore notifications from a repository
  -o, --org Specify all repositories from an organization or user
  -r, --ratelimit Skip checks making sure GitHub repo is valid (Skips 1 hit per repo)
  -t, --token A token
  -u, --unwatch Unwatch instead of watch
  -w, --watch Specify a repo
Examples
  $ export WATCH_GITHUB_REPOS='19shfds0' # valid  github token
  ~/src/RichardLitt/unwatch-gh-repos $ watch-gh-repos
  Watched: RichardLitt/unwatch-gh-repos
  $ watch-gh-repos RichardLitt/watch-gh-repos
  Watched: RichardLitt/watch-gh-repos
  $ watch-gh-repos --unwatch RichardLitt/watch-gh-repos
  Unwatched: RichardLitt/watch-gh-repos
  $ watch-gh-repos --org --watch RichardLitt
  Watched: RichardLitt/first-repoContribute
Contributions welcome. Please check out the issues.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2017 Richard Littauer