Skip to content

Commit e63b7a6

Browse files
oscard0mgr2m
andauthored
feat: Initial version (#1)
* docs(README): remove WIP note * build(package): initial version * build(package): lock file * build(gitignore): node_modules * feat: initial version * docs(README): badges * docs(README): usage * ci(release): initial version * ci(test): initial version * feat(script): watch / unwatch / ignore repository * ci(release): Update actions/cache to v2 Co-authored-by: Gregor Martynus <[email protected]> * docs(README): improve description message Co-authored-by: Gregor Martynus <[email protected]> * chore(package.json)L Improve description message Co-authored-by: Gregor Martynus <[email protected]> * chore(script.js): Improve description comment Co-authored-by: Gregor Martynus <[email protected]> * fix(script): throw error instead of log.error to stop execution * docs(readme): add description for command options * chore(script): remove redundant log info from loggers Co-authored-by: Gregor Martynus <[email protected]>
1 parent e04c1d8 commit e63b7a6

File tree

8 files changed

+2018
-3
lines changed

8 files changed

+2018
-3
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 12
16+
- uses: actions/cache@v2
17+
with:
18+
path: ~/.npm
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
20+
restore-keys: |
21+
${{ runner.os }}-node-
22+
- run: npm ci
23+
- run: npx semantic-release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
test_matrix:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node_version: ["12", "14"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node_version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node_version }}
22+
- uses: actions/cache@v1
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
- run: npm ci
29+
- run: npm test
30+
31+
# The "test" step can be required in branch protection and does not
32+
# change each time the test matrix changes.
33+
test:
34+
runs-on: ubuntu-latest
35+
needs: test_matrix
36+
steps:
37+
- run: echo ok

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
# 🚧 WORK IN PROGRESS. See [#1](https://github.com/oscard0m/octoherd-script-watch-unwatch-or-ignore/pull/1)
2-
31
# octoherd-script-watch-unwatch-or-ignore
42

5-
> An octoherd script to watch, unwatch or ignore a repository
3+
> An octoherd script to watch, unwatch or ignore repositories
4+
5+
[![@latest](https://img.shields.io/npm/v/octoherd-script-watch-unwatch-or-ignore.svg)](https://www.npmjs.com/package/octoherd-script-watch-unwatch-or-ignore)
6+
[![Build Status](https://github.com/oscard0m/octoherd-script-watch-unwatch-or-ignore/workflows/Test/badge.svg)](https://github.com/oscard0m/octoherd-script-watch-unwatch-or-ignore/actions?query=workflow%3ATest+branch%3Amain)
7+
8+
## Usage
9+
10+
```js
11+
npx octoherd-script-watch-unwatch-or-ignore \
12+
--octoherd-token 0123456789012345678901234567890123456789 \
13+
"oscard0m/*"
14+
```
15+
16+
Add `--ignore` flag to ignore notifications for selected repositories
17+
18+
Add `--unwatch` flag to unwatch selected repositories
619

720
## Contributing
821

cli.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env node
2+
3+
import { script } from "./script.js";
4+
import { run } from "@octoherd/cli/run";
5+
6+
run(script);

0 commit comments

Comments
 (0)