|
| 1 | +# GitHub Copilot Instructions for Interledger Charts |
| 2 | + |
| 3 | +- **Purpose**: Hosts Helm charts for Interledger; packaged charts + index live in docs/interledger; all charts depend on the shared common library (see [README.md](README.md)). |
| 4 | +- **Repo layout**: charts/ holds individual charts; docs/ stores published Helm repo assets; tooling/ contains Node ESM scripts for versioning. |
| 5 | +- **Generated assets**: docs/interledger is generated; do not edit by hand. |
| 6 | +- **Chart identity**: Chart names come from Chart.yaml `name` (not folder names); versioning walks up from changed files to locate Chart.yaml (see [tooling/versioner.js](tooling/versioner.js)). |
| 7 | +- **Auto versioning (PR preview)**: [.github/workflows/versioning.yml](.github/workflows/versioning.yml) runs on pull_request_target (skips chore/version-bump branches), blocks PRs that touch docs/interledger, and previews bumps without committing. Only charts/ changes are considered; bump level comes from PR title/commit message using Conventional Commit rules. |
| 8 | +- **Auto versioning (on merge)**: [.github/workflows/versioning-merge.yml](.github/workflows/versioning-merge.yml) runs when a PR merges into main (unless labeled manual-versioning), updates Chart.yaml versions, packages changed charts, regenerates the Helm index, and opens a chore/version-bump PR with automerge labels. |
| 9 | +- **Manual override**: Add the manual-versioning label to skip automation and bump Chart.yaml yourself. |
| 10 | +- **Common library changes**: When editing the shared common chart, prefer adding the manual-versioning label so you can bump it and update dependent test charts (e.g., charts/tests/common-unittests and charts/examples/*) in the same PR without the auto-versioner firing early. |
| 11 | +- **Packaging details**: chartmanager runs `helm dep update`, `helm package`, and `helm repo index` targeting docs/interledger with repo URL https://interledger.github.io/charts/interledger (see [tooling/chartmanager.js](tooling/chartmanager.js)). |
| 12 | +- **Commit message source**: resolveCommitMessage prefers PR title, then head commit message, then PR_TITLE env var, otherwise falls back to chore: bump charts (see [tooling/runner.js](tooling/runner.js)). |
| 13 | +- **Tooling stack**: Node 24 with pnpm 10; run `pnpm install` in tooling/, then `pnpm lint` (tsc) and `pnpm test` (node --test) (see [tooling/package.json](tooling/package.json)). |
| 14 | +- **Helm unit tests CI**: [.github/workflows/unit-tests.yml](.github/workflows/unit-tests.yml) discovers charts (excluding charts/docs/tests/common) and, for each, runs `helm unittest` plus `helm template <chart> | kubeconform -strict -summary -ignore-missing-schemas` inside the ghcr.io/interledger/builders/chartvalidator:v0.5 container. |
| 15 | +- **Local validation tip**: Mirror the CI by running helm unittest for the chart and kubeconform against templated output before pushing. |
| 16 | +- **CI guardrails**: Versioning workflow fails PRs that modify docs/interledger unless manual-versioning is set (see [.github/workflows/versioning.yml](.github/workflows/versioning.yml)). |
| 17 | +- **Conventional commits**: Use feat/fix/breaking titles for correct bumping; non-compliant titles default to a patch bump. |
| 18 | +- **Common pitfalls**: Changes outside charts/ do not trigger version bumps; ensure Chart.yaml has a proper `name`; avoid manual edits in generated docs/interledger; automation sets appVersion to v{version} if missing. |
| 19 | +- **Publishing**: Helm repo URL is expected to remain https://interledger.github.io/charts/interledger to match Chart.lock dependencies (see [README.md](README.md)). |
| 20 | +- **New charts**: Place under charts/, include Chart.yaml and a README; add helm-unittest suites where possible; automation will package and index after merge. |
| 21 | +- **Meta**: If you discover missing or outdated guidance, propose updates to this file in your PR to keep agent instructions fresh. |
| 22 | +- **Docs**: [README.md](README.md) explains versioning behavior and manual overrides—refer to it when adjusting workflows or version rules. |
| 23 | + |
0 commit comments