https://github.com/runnerty/notifier-slack
Runnerty module: Slack notifier.
https://github.com/runnerty/notifier-slack
Last synced: about 1 month ago
JSON representation
Runnerty module: Slack notifier.
- Host: GitHub
- URL: https://github.com/runnerty/notifier-slack
- Owner: runnerty
- License: mit
- Created: 2018-01-26T07:44:58.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T01:50:13.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T16:54:57.211Z (over 1 year ago)
- Language: JavaScript
- Size: 189 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Smart Processes Management
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Dependency Status][david-badge]][david-badge-url]
# Slack notifier for [Runnerty]:
### Installation:
Through NPM
```bash
npm i @runnerty/notifier-slack
```
You can also add modules to your project with [runnerty]
```bash
npx runnerty add @runnerty/notifier-slack
```
This command installs the module in your project, adds example configuration in your [config.json] and creates an example plan of use.
If you have installed [runnerty] globally you can include the module with this command:
```bash
runnerty add @runnerty/notifier-slack
```
### Configuration sample:
Add in [config.json]:
```json
{
"notifiers": [
{
"id": "slack_default",
"type": "@runnerty-notifier-slack",
"token": "MY_BOT_TOKEN",
"bot_name": "Runnerty-Sentinel",
"channel": "MY_CHANNEL",
"maxConcurrents": 1,
"minInterval": 600
}
]
}
```
### Plan sample:
Add in [plan.json]:
- Simple
```json
{
"id": "slack_default",
"bot_emoji": ":metal:",
"channel": "MY_CHANNEL",
"message": "PROCESS *:PROCESS_ID* OF CHAIN :CHAIN_ID RUNNING!"
}
```
- Attachments
```json
{
"id": "slack_default",
"bot_name": "Runnerty Bot",
"bot_emoji": ":metal:",
"channel": "MY_CHANNEL",
"attachments": [
{
"fallback": "Required plain-text summary of the attachment.",
"color": "#36a64f",
"pretext": "Simple sample pretext",
"author_name": "Runnerty Bot",
"author_link": "https://github.com/runnerty/notifier-slackhttp://runnerty.io",
"author_icon": "https://runnerty.io/assets/header/logo-stroked.png",
"title": "Slack attachment sample",
"title_link": "https://api.slack.com/docs/messages/builder",
"text": "More info",
"fields": [
{
"title": "Priority",
"value": "High",
"short": false
}
],
"image_url": "http://my-website.com/path/to/image.jpg",
"thumb_url": "https://runnerty.io/assets/header/logo-stroked.png",
"footer": "Runnerty Notifier Slack Sample",
"footer_icon": "https://runnerty.io/assets/header/logo-stroked.png"
}
]
}
```
- Upload File
```json
{
"id": "slack_default",
"bot_emoji": ":metal:",
"channel": "MY_CHANNEL",
"message": "PROCESS *:PROCESS_ID* OF CHAIN :CHAIN_ID RUNNING!",
"file": "./resume.csv"
}
```
[runnerty]: https://www.runnerty.io
[downloads-image]: https://img.shields.io/npm/dm/@runnerty/notifier-slack.svg
[npm-url]: https://www.npmjs.com/package/@runnerty/notifier-slack
[npm-image]: https://img.shields.io/npm/v/@runnerty/notifier-slack.svg
[david-badge]: https://david-dm.org/runnerty/notifier-slack.svg
[david-badge-url]: https://david-dm.org/runnerty/notifier-slack
[config.json]: https://docs.runnerty.io/config/
[notifiers]: https://docs.runnerty.io/notifiers
[plan.json]: https://docs.runnerty.io/plan/