https://github.com/screwdriver-cd/notifications-base
Base class for defining the behavior between screwdriver and notifications plugins
https://github.com/screwdriver-cd/notifications-base
Last synced: 11 months ago
JSON representation
Base class for defining the behavior between screwdriver and notifications plugins
- Host: GitHub
- URL: https://github.com/screwdriver-cd/notifications-base
- Owner: screwdriver-cd
- License: other
- Created: 2017-02-23T22:49:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-04T19:11:58.000Z (almost 2 years ago)
- Last Synced: 2024-11-07T04:18:55.101Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://cd.screwdriver.cd/pipelines/133
- Size: 23.4 KB
- Stars: 0
- Watchers: 17
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Notifications Base
[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]
> Base class for defining the behavior between screwdriver and notifications plugins
## Usage
```bash
npm install screwdriver-notifications-base
```
## Interface
This is an interface for receiving Screwdriver API events and sending notification to users based on their job settings.
### notify
#### Expected Outcome
Notify the user based on their job settings, e.g. [email](https://github.com/screwdriver-cd/notifications-email), [slack](https://github.com/screwdriver-cd/notifications-slack).
## Extending
To extend the base class, the functions to override are:
1. `_notify`
2. `events` (optional)
Override `events` if you want to send notification based on other events.
## Testing
```bash
npm test
```
## License
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
[npm-image]: https://img.shields.io/npm/v/screwdriver-notifications-base.svg
[npm-url]: https://npmjs.org/package/screwdriver-notifications-base
[downloads-image]: https://img.shields.io/npm/dt/screwdriver-notifications-base.svg
[license-image]: https://img.shields.io/npm/l/screwdriver-notifications-base.svg
[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/notifications-base.svg
[issues-url]: https://github.com/screwdriver-cd/notifications-base/issues
[status-image]: https://cd.screwdriver.cd/pipelines/133/badge
[status-url]: https://cd.screwdriver.cd/pipelines/133