GithubHelp home page GithubHelp logo

isabella232 / hipchat-notifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from medallia/hipchat-notifier

0.0 0.0 0.0 25 KB

Push HipChat notifications to the configured room.

License: MIT License

JavaScript 100.00%

hipchat-notifier's Introduction

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

  1. Go to hipchat.com.
  2. Click "rooms".
  3. Click your room name.
  4. 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.

hipchat-notifier's People

Contributors

cverges-medallia avatar ebergama avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.