<commit_before>---
date: 2016-01-01T00:00:00+00:00
title: Hipchat
author: jmccann
tags: [ notifications, chat ]
repo: jmccann/drone-hipchat
logo: hipchat.svg
image: jmccann/drone-hipchat
---

The Hipchat plugin sends build status messages to users and rooms. The below pipeline configuration demonstrates simple usage:

```yaml
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
    auth_token: <PASSWORD>-token
```

Example configuration with a custom hipchat server:

```diff
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
+   url: https://api.hipchat.foo.com
```

Example configuration with a custom message template:

```diff
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
+   template: |
+     {{ #success build.status }}
+       build {{ build.number }} succeeded. Good job.
+     {{ else }}
+       build {{ build.number }} failed. Fix me please.
+     {{ /success }}
```

# Secrets

The Hipchat plugin supports reading credentials from the Drone secret store. This is strongly recommended instead of storing credentials in the pipeline configuration in plain text.

```diff
pipeline:
  slack:
    image: plugins/hipchat
    room: my-room
-   auth_token: my-auth-token
```

The above `auth_token` Yaml attribute can be replaced with the `HIPCHAT_AUTH_TOKEN` secret environment variable. Please see the Drone documentation to learn more about secrets.

# Parameter Reference

url
: HipChat server URL, defaults to `https://api.hipchat.com`

auth_token
: HipChat V2 API token; use a room or user token with the `Send Notification` scope

room
: ID or URL encoded name of the room

from: drone
: A label to be shown in addition to sender's name<commit_msg>Fix plugin name and add link back to drone secrets documentation<commit_after>---
date: 2016-01-01T00:00:00+00:00
title: Hipchat
author: jmccann
tags: [ notifications, chat ]
repo: jmccann/drone-hipchat
logo: hipchat.svg
image: jmccann/drone-hipchat
---

The Hipchat plugin sends build status messages to users and rooms. The below pipeline configuration demonstrates simple usage:

```yaml
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
    auth_token: <PASSWORD>-token
```

Example configuration with a custom hipchat server:

```diff
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
+   url: https://api.hipchat.foo.com
```

Example configuration with a custom message template:

```diff
pipeline:
  hipchat:
    image: jmccann/drone-hipchat
    room: my-room
+   template: |
+     {{ #success build.status }}
+       build {{ build.number }} succeeded. Good job.
+     {{ else }}
+       build {{ build.number }} failed. Fix me please.
+     {{ /success }}
```

# Secrets

The Hipchat plugin supports reading credentials from the Drone secret store. This is strongly recommended instead of storing credentials in the pipeline configuration in plain text.

```diff
pipeline:
  slack:
    image: jmccann/drone-hipchat
    room: my-room
-   auth_token: my-auth-token
```

The above `auth_token` Yaml attribute can be replaced with the `HIPCHAT_AUTH_TOKEN` secret environment variable.
Please see the [Drone documentation](http://readme.drone.io/0.5/secrets-with-plugins/) to learn more about secrets.

# Secret Reference

HIPCHAT_AUTH_TOKEN
: HipChat V2 API token

# Parameter Reference

url
: HipChat server URL, defaults to `https://api.hipchat.com`

auth_token
: HipChat V2 API token; use a room or user token with the `Send Notification` scope

room
: ID or URL encoded name of the room

from: drone
: A label to be shown in addition to sender's name
{'fraction_non_alphanumeric': 0.0957622454595487, 'fraction_numerical': 0.011282333516785911, 'mean_word_length': 3.764089121887287, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4801146', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1116, 'n_words': 406}