Extends

Your repo config file can "extend" an existing config file that lives somewhere else. This makes it easy re-use configurations across your organization and/or base your configuration off of a template.

Templates need to be accessible via a URL. Any publicly accessible HTTPS URL will work. You can also point us to a private GitHub repo URL within the same organization where the GitHub App is installed (e.g. https://api.github.com/repos/example/pullapprove-config/contents/.pullapprove.yml).

# you need at least these 2 fields to extend a template
version: 3
extends: https://api.github.com/repos/example/pullapprove-config/contents/.pullapprove.yml

Template merging

When you extend a template and provide settings in the .pullapprove.yml file itself, the settings will be merged together. You can see your merged config in the "Config" tab of the PullApprove status page.

The basic rule is that dictionaries will be merged, and any other kinds of fields will be overwritten.

For example, the groups are a dictionary (each group name is a key). If you have groups in your template and groups in your repo config, they will be merged together.

Template

version: 3
groups:
  template_group: ...

Repo

version: 3
extends: <template url>
groups:
  repo_group: ...

Merged config

version: 3
extends: <template url>
groups:
  template_group: ...
  repo_group: ...

Other fields that are lists, integers, or strings will be overwritten by your repo config. A common example of this is pullapprove_conditions.

Template

version: 3
pullapprove_conditions:
- <template condition>

Repo

version: 3
extends: <template url>
pullapprove_conditions:
- <repo condition>

Merged config

version: 3
extends: <template url>
pullapprove_conditions:
- <repo condition>

Docs

Features

Config

Resources

© 2019 Dropseed, LLC