Skip to content

Per-repo Overrides

Each repository in a FileSet receives the same set of files. Overrides let you customize specific files for specific repos while keeping the rest consistent.

spec:
repositories:
- my-cli
- name: gh-infra
overrides:
- path: .github/CODEOWNERS
content: |
* @babarot @co-maintainer
files:
- path: .github/CODEOWNERS
content: |
* @babarot
- path: LICENSE
source: ./templates/LICENSE

In this example, my-cli gets the default CODEOWNERS (* @babarot), while gh-infra gets a customized version with an additional maintainer. Both repos receive the same LICENSE.

An override replaces the matching file entry (matched by path) for that repository only. The override must specify path and either content or source, just like a regular file entry.

Files without a matching override are unchanged — they use the default from the files list.

If an override doesn’t specify vars, it inherits the vars from the original file entry:

spec:
repositories:
- my-cli
- name: special-repo
overrides:
- path: Makefile
vars:
binary_name: "special-binary" # overrides the default
files:
- path: Makefile
source: ./templates/Makefile
vars:
binary_name: "<% .Repo.Name %>" # default for all repos
  • my-cli uses binary_name: "my-cli" (from the template expansion of <% .Repo.Name %>)
  • special-repo uses binary_name: "special-binary" (from the override)