<commit_before># hubot-esa

[![npm](http://img.shields.io/npm/v/hubot-esa.svg)](https://www.npmjs.com/package/hubot-esa)
[![CircleCI](https://img.shields.io/circleci/project/hmsk/hubot-esa.svg)](https://circleci.com/gh/hmsk/hubot-esa)

A Hubot script handling webhooks and retrieving info from esa: https://esa.io

## Features

### Retrieve info when someone talking about URL of esa

#### Post

![image](https://cloud.githubusercontent.com/assets/85887/15594917/2779611a-236f-11e6-8636-1cf975c79048.png)

#### Comment

![image](https://cloud.githubusercontent.com/assets/85887/15594944/73b3c26e-236f-11e6-921b-7a78dadf0489.png)

### Retrieve stats of your team

- Command: `hubot esa stats`

![image](https://cloud.githubusercontent.com/assets/85887/15595025/29e6acfe-2370-11e6-9564-6d62f3288701.png)

### Handle webhooks

![image](https://cloud.githubusercontent.com/assets/85887/15594882/c5362c18-236e-11e6-8b0f-736d07696933.png)

## Installation

```
$ npm install hubot-esa --save
```

And then add `hubot-esa` to your `external-scripts.json`.

Also you need some variables to environment your Hubot runs.

### Add to your Hubot project

### Base Settings

```
export HUBOT_ESA_ACCESS_TOKEN='<PASSWORD>_token'    # Required, your personal access token
export HUBOT_ESA_TEAM_NAME='gingypurrs'         # Required, your team name
export HUBOT_ESA_WEBHOOK_DEFAULT_ROOM='random'  # Required, room name you get notification by webhook
export HUBOT_ESA_WEBHOOK_ENDPOINT='/ginger/esa' # Optional, Default: "/hubot/esa"
export HUBOT_ESA_WEBHOOK_SECRET_TOKEN='true'    # Optional
```

#### `HUBOT_ESA_ACCESS_TOKEN` Required

- Generate and set your "Personal access token" from `https://[your-team].esa.io/user/applications`.
<commit_msg>Update README - Replace feature's image with screencast<commit_after># hubot-esa

[![npm](http://img.shields.io/npm/v/hubot-esa.svg)](https://www.npmjs.com/package/hubot-esa)
[![CircleCI](https://img.shields.io/circleci/project/hmsk/hubot-esa.svg)](https://circleci.com/gh/hmsk/hubot-esa)

A Hubot script handling webhooks and retrieving info from esa: https://esa.io

![hubot-esa-screen ](https://cloud.githubusercontent.com/assets/85887/16569333/2517c0e4-41ea-11e6-9cb8-b436ec1625df.gif)

- Handle received webhooks
  - Post created
  - Post update
  - Post archived
  - Comment created
  - Member joined
- Retrieve info when someone talking about URL of esa
  - Post
  - Comment
- Retrieve stats of your team by `hubot esa stats`

## Installation

```
$ npm install hubot-esa --save
```

And then add `hubot-esa` to your `external-scripts.json`.

Also you need some variables to environment your Hubot runs.

### Add to your Hubot project

### Base Settings

```
export HUBOT_ESA_ACCESS_TOKEN='access_token'    # Required, your personal access token
export HUBOT_ESA_TEAM_NAME='gingypurrs'         # Required, your team name
export HUBOT_ESA_WEBHOOK_DEFAULT_ROOM='random'  # Required, room name you get notification by webhook
export HUBOT_ESA_WEBHOOK_ENDPOINT='/ginger/esa' # Optional, Default: "/hubot/esa"
export HUBOT_ESA_WEBHOOK_SECRET_TOKEN='true'    # Optional
```

#### `HUBOT_ESA_ACCESS_TOKEN` Required

- Generate and set your "Personal access token" from `https://[your-team].esa.io/user/applications`.

{'fraction_non_alphanumeric': 0.13476923076923078, 'fraction_numerical': 0.055692307692307694, 'mean_word_length': 4.774422735346358, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 15, 'lorem ipsum': 0, 'www.': 2, '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': '3033330', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1173, 'n_words': 240}