3.3. Inheritance#

While templating greatly reduces data redundancy, facilitates maintenance, and ensures consistency within a project, inheritance does the same across multiple projects, allowing you to easily share and reuse configurations and metadata between them, and manage them from a single source. It works similarly to templating, but instead of referencing a path within your project’s control center configurations, you can reference a URL to any JSON, YAML, or TOML data file, along with an optional JSONPath expression to extract specific data from it. For example, if you have a GitHub organization with multiple repositories, you can create a repository that contains all the shared configurations and metadata, and have all other repositories inherit them.

Caching

To speed up the processing of your repository’s control center, the retrieved data can be cached on both local devices and on GitHub servers, so that they don’t need to be fetched every time. See Caching for more information.

3.3.1. Syntax#

Inherited values are defined using a custom YAML tag named ext, with the syntax !ext URL [JSONPath], where:

  • !ext defines the tag.

  • URL is the URL to the data file.

  • [JSONPath] is an optional JSONPath expression pointing to the value you want to extract from the data file. If omitted, the top-level object (i.e., the entire file) is used.