another-hipchat-notifier
v1.2.1
Published
Push notifications to a HipChat room
Downloads
6
Maintainers
Readme
Medallia HipChat Notifier
Synopsis
Push notifications to a HipChat room.
Prerequisites
- NodeJS 4.X or higher
- A HipChat API token for and admin access to your team room
Creating a HipChat Room Token
- Go to hipchat.com.
- Click "rooms".
- Click your room name.
- Click "tokens".
Installation
npm install -g another-hipchat-notifier
Configuration
- Save the message to post to a text file
- Prepare the
configuration
file as shown below:
{
"req-body": {
"from": "Jira Board Notifier",
"message_format": "text",
"color": "red",
"notify": "true"
...
},
"settings": {
"api-token": "...",
"room": "Room Name"
}
}
The req-body
section follows the room notification API from HipChat.
Usage
As a binary
ahn --config=<config-file> --template=<template-file>
# For more options
ahn --help
As a module
You can create a template file or specify the string message.
Create the template.msg
file
Hi {dev1} {dev2}
Use the plugin
var notify = require('another-hipchat-notifier');
var context = {
dev1: '@Eze',
dev2: '@Lucia'
};
// Option 1
notify('./config.json', './template.msg', context)
.then(body => console.log("Done!"))
.catch(err => console.error("Something wrong happened."));
// Option 2
notify('./config.json', 'Hi {dev1} {dev2}', context)
.then(body => console.log("Done!"))
.catch(err => console.error("Something wrong happened."));
// Option 3
var config = {...};
notify(config, 'Hi {dev1} {dev2}', context)
.then(body => console.log("Done!"))
.catch(err => console.error("Something wrong happened."));
Development
Run test
npm install
npm test
License & Copyright
This software is copyrighted 2016 by Medallia, Inc. and released under the MIT License.