<commit_before>Use this plugin to trigger builds for a list of downstream repositories. This is useful when updates to a repository have downstream impacts that should also be tested. These are the configuration options:

* `repositories` - list of repositories to trigger
* `server` - the server on which you want to trigger builds

* `DOWNSTREAM_TOKEN` - A secret that specifies the token for the drone server

The following is a sample configuration in your .drone.yml file:

```yaml
notify:
  downstream:
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World
      - octocat/Spoon-Knife
    when:
      event: push
      branch: master
      success: true
```

In some cases you may want to trigger specific branches:

```
notify:
  downstream:
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World@develop
      - octocat/Spoon-Knife@master
```

Please be sure to include the `when` section in your `.drone.yml` to avoid triggering builds for pull requests, tags and failed builds.

You can also trigger a new build for a repository using `fork: true` :

```yaml
notify:
  downstream:
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World
      - octocat/Spoon-Knife
    fork: true
    when:
      event: push
      branch: master
      success: true
```
<commit_msg>Added image to docs<commit_after>Use this plugin to trigger builds for a list of downstream repositories. This
is useful when updates to a repository have downstream impacts that should also
be tested.

## Config

The following parameters are used to configure the plugin:

* **token** - secret that specifies the token for the drone server
* **repositories** - list of repositories to trigger
* **server** - the server on which you want to trigger builds

The following secret values can be set to configure the plugin.

* **DOWNSTREAM_TOKEN** - corresponds to **token**

It is highly recommended to put the **DOWNSTREAM_TOKEN** into a secret so it is
not exposed to users. This can be done using the drone-cli.

```bash
drone secret add --image=plugins/downstream \
    octocat/hello-world DOWNSTREAM_TOKEN my-secret-token
```

Then sign the YAML file after all secrets are added.

```bash
drone sign octocat/hello-world
```

See [secrets](http://readme.drone.io/0.5/usage/secrets/) for additional
information on secrets

## Examples

The following is a sample configuration in your .drone.yml file:

```yaml
notify:
  downstream:
    image: plugins/downstream
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World
      - octocat/Spoon-Knife
    when:
      event: push
      branch: master
      success: true
```

In some cases you may want to trigger specific branches:

```
notify:
  downstream:
    image: plugins/downstream
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World@develop
      - octocat/Spoon-Knife@master
```

You can also trigger a new build for a repository using `fork: true`:

```yaml
notify:
  downstream:
    image: plugins/downstream
    server: https://ci.example.com
    repositories:
      - octocat/Hello-World
      - octocat/Spoon-Knife
    fork: true
    when:
      event: push
      branch: master
      success: true
```

Please be sure to include the `when` section in your `.drone.yml` to avoid
triggering builds for pull requests, tags and failed builds. 

{'fraction_non_alphanumeric': 0.08450704225352113, 'fraction_numerical': 0.0005868544600938967, 'mean_word_length': 3.1982758620689653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '5332316', 'n_tokens_mistral': 1025, 'n_tokens_neox': 965, 'n_words': 391}