<commit_before># hapi-greenkeeper-keeper

hapi plugin to automatically merge and clean up passing greenkeeper PRs

[![npm](https://img.shields.io/npm/v/hapi-greenkeeper-keeper.svg?maxAge=2592000)](https://www.npmjs.com/package/hapi-greenkeeper-keeper)
[![license](https://img.shields.io/github/license/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)](LICENSE)

[![Build Status](https://img.shields.io/travis/greenkeeper-keeper/hapi-greenkeeper-keeper.svg?style=flat&branch=master)](https://travis-ci.org/greenkeeper-keeper/hapi-greenkeeper-keeper)
[![Codecov](https://img.shields.io/codecov/c/github/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)](https://codecov.io/github/greenkeeper-keeper/hapi-greenkeeper-keeper)

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
![greenkeeper badge](https://badges.greenkeeper.io/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)

## Version

Until we release a [stable `v1.0.0`](https://github.com/greenkeeper-keeper/hapi-greenkeeper-keeper/milestone/1),
please be aware that _minor_ releases may contain breaking changes.

## Installation

```bash
$ npm install hapi-greenkeeper-keeper -S
```

## Usage

This is a [hapi](https://hapijs.com/) plugin that you can load into your server
instance. You can either [load the plugin](https://hapijs.com/tutorials/plugins#loading-a-plugin)
yourself or use [glue](https://github.com/hapijs/glue) to compose your server
configuration for a manifest.

### Configuration

This plugin has a few required options that you will need to pass when you load
the plugin on your server.

* __`github.token`__: a [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/)
  for the GitHub account that you intend to process greenkeeper PRs

  _Note_: the personal access token will need the `repo` and `repo:read_hooks`
  scopes in order to work properly
* __`squash`__: whether or not you want the commits on the branch squashed
  before merging
* __`deleteBranches`__: whether or not you want greenkeeper-keeper to delete
  branches for merged PRs

  _Note_: if you are using the new GitHub integration version of Greenkeeper,
  branches are already deleted automatically<commit_msg>docs(validation): documented the expectations of config that will now be validated<commit_after># hapi-greenkeeper-keeper

hapi plugin to automatically merge and clean up passing greenkeeper PRs

[![npm](https://img.shields.io/npm/v/hapi-greenkeeper-keeper.svg?maxAge=2592000)](https://www.npmjs.com/package/hapi-greenkeeper-keeper)
[![license](https://img.shields.io/github/license/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)](LICENSE)

[![Build Status](https://img.shields.io/travis/greenkeeper-keeper/hapi-greenkeeper-keeper.svg?style=flat&branch=master)](https://travis-ci.org/greenkeeper-keeper/hapi-greenkeeper-keeper)
[![Codecov](https://img.shields.io/codecov/c/github/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)](https://codecov.io/github/greenkeeper-keeper/hapi-greenkeeper-keeper)

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
![greenkeeper badge](https://badges.greenkeeper.io/greenkeeper-keeper/hapi-greenkeeper-keeper.svg)

## Version

Until we release a [stable `v1.0.0`](https://github.com/greenkeeper-keeper/hapi-greenkeeper-keeper/milestone/1),
please be aware that _minor_ releases may contain breaking changes.

## Installation

```bash
$ npm install hapi-greenkeeper-keeper -S
```

## Usage

This is a [hapi](https://hapijs.com/) plugin that you can load into your server
instance. You can either [load the plugin](https://hapijs.com/tutorials/plugins#loading-a-plugin)
yourself or use [glue](https://github.com/hapijs/glue) to compose your server
configuration for a manifest.

### Configuration

This plugin has a few required options that you will need to pass when you load
the plugin on your server.

* __`github.token`__ _required_: a [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/)
  for the GitHub account that you intend to process greenkeeper PRs

  _Note_: the personal access token will need the `repo` and `repo:read_hooks`
  scopes in order to work properly
* __`squash`__ _required_: whether or not you want the commits on the branch
  squashed before merging
* __`deleteBranches`__ _defaults to `false`_: whether or not you want
  greenkeeper-keeper to delete branches for merged PRs

  _Note_: if you are using the new GitHub integration version of Greenkeeper,
  branches are already deleted automatically
{'fraction_non_alphanumeric': 0.12352815242988653, 'fraction_numerical': 0.004709912224363092, 'mean_word_length': 5.279569892473118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 28, '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': '2665874', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1422, 'n_words': 366}