Skip to content

Commit

Permalink
feat: Initial version (#1)
Browse files Browse the repository at this point in the history
* 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 <39992+gr2m@users.noreply.github.com>

* docs(README): improve description message

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>

* chore(package.json)L Improve description message

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>

* chore(script.js): Improve description comment

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>

* 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 <39992+gr2m@users.noreply.github.com>
  • Loading branch information
oscard0m and gr2m authored Mar 7, 2021
1 parent e04c1d8 commit e63b7a6
Show file tree
Hide file tree
Showing 8 changed files with 2,018 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release
on:
push:
branches:
- main

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]

jobs:
test_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: ["12", "14"]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm test

# The "test" step can be required in branch protection and does not
# change each time the test matrix changes.
test:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- run: echo ok
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# 🚧 WORK IN PROGRESS. See [#1](https://github.com/oscard0m/octoherd-script-watch-unwatch-or-ignore/pull/1)

# octoherd-script-watch-unwatch-or-ignore

> An octoherd script to watch, unwatch or ignore a repository
> An octoherd script to watch, unwatch or ignore repositories
[![@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)
[![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)

## Usage

```js
npx octoherd-script-watch-unwatch-or-ignore \
--octoherd-token 0123456789012345678901234567890123456789 \
"oscard0m/*"
```

Add `--ignore` flag to ignore notifications for selected repositories

Add `--unwatch` flag to unwatch selected repositories

## Contributing

Expand Down
6 changes: 6 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node

import { script } from "./script.js";
import { run } from "@octoherd/cli/run";

run(script);
Loading

0 comments on commit e63b7a6

Please sign in to comment.