Skip to content

File

File manages files in a single repository — CODEOWNERS, LICENSE, CI workflows, security policies, and any other files you want to keep in a declared state.

metadata:
owner: babarot # GitHub owner or organization
name: my-cli # Repository name

The combination of owner and name identifies the target repository (babarot/my-cli).

FieldDefaultDescription
files(required)List of files to manage — see File Sources
files[].patches(none)List of unified diff patches (file paths or inline) applied after template expansion — see Patches.
files[].reconcilepatchPer-entry reconcile mode: patch (add/update), mirror (add/update/delete), or create_only (create if missing, never update) — see Reconcile.
viapushDelivery method: push or pull_request — see Delivery Method.
commit_messageautoCustom commit message
branchautoBranch name for pull_request mode
pr_titlecommit_messageCustom PR title (pull_request only)
pr_bodyautoCustom PR body (pull_request only)

File content supports <% %> template syntax for per-repo customization — see Templating.

Use File when you want to manage files in one repo’s YAML file. This is the simplest file management resource and the starting point for most users.

It works best when:

  • Each repo has its own distinct files — different CODEOWNERS, different CI workflows, different licenses.
  • You want per-repo change tracking — each file maps to one repo, so git blame tells you exactly who changed what and when.
  • You’re managing files in a small number of repos — for 1–5 repos, separate files are easy to maintain.

If you find yourself copying the same files across many repos, consider FileSet instead.