<commit_before>lurker
======

[![Build Status](https://travis-ci.org/jagoda/lurker.svg?branch=master)](https://travis-ci.org/jagoda/lurker)

> Workflow analytics.

## Overview

**Prerequisites**:
 + [cube][cube]

`lurker` uses [cube][cube] to collect metrics about and create reports around
process workflows. Assuming the prerequisites are installed, the server can
be setup using the following:

	git clone https://github.com/jagoda/lurker.git /opt/lurker
	cd /opt/lurker
	npm install
	export CLIENT_ID="GitHub client ID"
	export CLIENT_SECRET="GitHub client secret"
	export SECRET="a shared secret"
	npm start

The `SECRET` environment variable is required in order for `lurker` to verify
webhook requests. The `CLIENT_ID` and `CLIENT_SECRET` environment variables
are also required and are used to verify requests to the [cube][cube]
pass-through API (via [badge][badge]). The port that the server listens on can
also be configured using the `PORT` environment variable. By default `lurker`
listens on 8080.

## Cube Pass-Through API

Since [cube][cube] does not have built-in security, `lurker` provides a
pass-through API that secures the [cube][cube] endpoints. The collector is
available at `/collector` and the evaluator is at `/evaluator`. Both endpoints
require a header of the form `Authorization: token <token>` where the token is
is a valid GitHub token associated with the `CLIENT_ID` and `CLIENT_SECRET`.
Other than the authentication header, all the other API functions behave as
normal. Please see the [cube documentation][cube] for more details.

## Supported Webhooks

| Hook   | Endpoint  |
|--------|-----------|
| GitHub | `/github` |

[badge]: https://github.com/jagoda/badge "Badge"
[cube]: https://github.com/square/cube "Cube"<commit_msg>Documentation for the organization option.<commit_after>lurker
======

[![Build Status](https://travis-ci.org/jagoda/lurker.svg?branch=master)](https://travis-ci.org/jagoda/lurker)

> Workflow analytics.

## Overview

**Prerequisites**:
 + [cube][cube]

`lurker` uses [cube][cube] to collect metrics about and create reports around
process workflows. Assuming the prerequisites are installed, the server can
be setup using the following:

	git clone https://github.com/jagoda/lurker.git /opt/lurker
	cd /opt/lurker
	npm install
	export CLIENT_ID="GitHub client ID"
	export CLIENT_SECRET="GitHub client secret"
	export ORGANIZATION="GitHub organization"
	export SECRET="a shared secret"
	npm start

The `SECRET` environment variable is required in order for `lurker` to verify
webhook requests. The `CLIENT_ID` and `CLIENT_SECRET` environment variables
are also required and are used to verify requests to the [cube][cube]
pass-through API (via [badge][badge]). The `ORGANIZATION` environment variable
is required and specifies which GitHub organization's members will be allowed
to access the status UI. The port that the server listens on can also be
configured using the `PORT` environment variable. By default `lurker` listens
on 8080.

## Cube Pass-Through API

Since [cube][cube] does not have built-in security, `lurker` provides a
pass-through API that secures the [cube][cube] endpoints. The collector is
available at `/collector` and the evaluator is at `/evaluator`. Both endpoints
require a header of the form `Authorization: token <token>` where the token is
is a valid GitHub token associated with the `CLIENT_ID` and `CLIENT_SECRET`.
Other than the authentication header, all the other API functions behave as
normal. Please see the [cube documentation][cube] for more details.

## Supported Webhooks

| Hook   | Endpoint  |
|--------|-----------|
| GitHub | `/github` |

[badge]: https://github.com/jagoda/badge "Badge"
[cube]: https://github.com/square/cube "Cube"
{'fraction_non_alphanumeric': 0.10947930574098798, 'fraction_numerical': 0.002136181575433912, 'mean_word_length': 4.754224270353302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 10, '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': '5116000', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1153, 'n_words': 436}