Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RichardLitt/watch-gh-repos
Watch, unwatch, or ignore GitHub repositories
https://github.com/RichardLitt/watch-gh-repos
api cli git github github-api ignore javascript node organization repo repos repositories repository repostories unwatch watch
Last synced: 1 day ago
JSON representation
Watch, unwatch, or ignore GitHub repositories
- Host: GitHub
- URL: https://github.com/RichardLitt/watch-gh-repos
- Owner: RichardLitt
- License: mit
- Created: 2017-03-06T03:59:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-10T16:53:08.000Z (over 3 years ago)
- Last Synced: 2024-11-02T00:42:18.779Z (6 days ago)
- Topics: api, cli, git, github, github-api, ignore, javascript, node, organization, repo, repos, repositories, repository, repostories, unwatch, watch
- Language: JavaScript
- Homepage:
- Size: 1.18 MB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# watch-gh-repos
[![Greenkeeper badge](https://badges.greenkeeper.io/RichardLitt/watch-gh-repos.svg)](https://greenkeeper.io/)
> 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
```sh
> npm i watch-gh-repos
```## Usage
```js
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,` `--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 Personal Access Token for GitHub. You need scopes `notifications` and `repos`.
- `-u,` `--unwatch` Unwatch instead of watch
- `-w,` `--watch` Specify 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
```sh
npm i -g watch-gh-repos
```#### Usage
```shUsage
$ watch-gh-repos [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 repoExamples
$ 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-repo
```## Contribute
Contributions welcome. Please check out [the issues](https://github.com/RichardLitt/watch-gh-repos/issues).
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
[MIT](LICENSE) © 2017 Richard Littauer
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FRichardLitt%2Fwatch-gh-repos.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FRichardLitt%2Fwatch-gh-repos?ref=badge_large)