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 publicly accessible via a HTTPS URL.
You can also use a private GitHub repo URL within the same organization (e.g.
# 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
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.
# Template YAML version: 3 groups: template_group: ...
# Repo YAML version: 3 extends: <template url> groups: repo_group: ...
# Merged YAML version: 3 extends: <template url> groups: template_group: ... repo_group: ...
Fields that override
Fields that are lists, integers, or strings will be overwritten by your repo config.
A common example of this is
# Template YAML version: 3 pullapprove_conditions: - <template condition>
# Repo YAML version: 3 extends: <template url> pullapprove_conditions: - <repo condition>
# Merged YAML version: 3 extends: <template url> pullapprove_conditions: - <repo condition>