An open API service indexing awesome lists of open source software.

https://github.com/devtin/webhook-config-manager


https://github.com/devtin/webhook-config-manager

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# webhook-config-manager
> Consolidates all webhook configs found in given
> directory in a single new one.

Version
[![tests](https://github.com/devtin/webhook-config-manager/workflows/test/badge.svg)](https://github.com/devtin/webhook-config-manager/actions)

Looks for all `hook.json` found in `/**/*`. Loads the content of all of them, concatenate them in on single array
and writes the output in a file `/web-hooks.json`.

## Example

Take the following file structure:

```
my-projects/
├── project-a/
│ ├── hook.json
│ ├── index.js
│ └── package.json
├── project-b/
│ ├── hook.json
│ ├── index.js
│ └── package.json
└── project-c/
├── hook.json
├── index.js
└── package.json
```

**project-a/hooks.json**
```json
[
{
"name": "project a"
}
]
```

**`/project-b/hooks.js`**
```json
[
{
"name": "project b"
}
]
```

**`/project-c/hooks.js`**
```json
[
{
"name": "project c"
}
]
```

...and the following script:

```sh
$ npx webhook-config-manager
```

**`/web-hooks.json`**

```json
[
{
"name": "project a"
},
{
"name": "project b"
},
{
"name": "project c"
}
]
```

* * *

### License

[MIT](https://opensource.org/licenses/MIT)

© 2020-present Martin Rafael Gonzalez