Repository navigation
Description
Problem
Row 9 of devops repos onboard writes each rendered template file that differs from the file of the repository. It writes two groups of files that it must not write.
- Files that the repository owns.
copier.ymlof dan-petty/github-workflows lists them in_skip_if_exists:.github/renovate.json,.pre-commit-config.yaml,.devops/project.toml,version.txtand.release-please-manifest.json. Row 9 replaces each of them with the text of a first render. A repository with releases gets version0.0.0again. - The template source repository. For
github.template_repositoryitself, row 9 replaces the reusable workflows.github/workflows/pr-title.ymland.github/workflows/release.ymlwith callers of an older release of the same repository. Row 11 can then merge that pull request.
The Service also runs row 9 with writes for each repository of service.repos (ONBOARD_WRITE_ROWS, src/devops_cli/github/onboard/service_onboard.py). It writes as soon as its pod has the program copier.
Reproduction Steps
devops repos onboard dan-petty/github-workflows --plan at devops-cli 0.258.4 lists in row 9:
update .github/renovate.jsonupdate .github/workflows/pr-title.ymlupdate .github/workflows/release.ymlupdate .pre-commit-config.yamlupdate .release-please-manifest.jsonupdate version.txt
A render of the template at v0.2.0 with Copier gives version.txt 0.0.0 where the repository holds 0.2.0. It gives a release.yml of 32 lines where the repository holds the reusable workflow of 181 lines.
Expected behavior
- Row 9 does not write a file of
_skip_if_existsthat the repository holds. It writes such a file only when the repository lacks it, ascopier updatedoes. - For the template source repository, rows 9 and 11 are
skippedwith a reason. They send no write.
Existing tool considered
Copier (MIT), in use. _skip_if_exists already states which files the repository owns. Read that list from copier.yml at the template ref, or let Copier apply it to a render over the files of the repository.
Acceptance criteria
- A test gives a repository that holds
version.txtwith other text. A--confirmrun writes noversion.txt. - A test gives a repository that lacks
version.txt. A--confirmrun adds it. - A test onboards the template repository itself. Rows 9 and 11 are
skipped, and no route of these rows runs. docs/repos/onboard.mddescribes both rules.
Related
#7411 (row 9 writes the template text over a differing file so that copier update applies with no conflict). copier update does not rewrite a file of _skip_if_exists, so such a file cannot cause that conflict.
Activity
dan-petty commentedon Nov 30, 2026
The bug overwrites version.txt and workflow files, corrupting repository state.fix(repos): onboard keeps the files that a repository owns
docs(openspec): archive the change of the owned files (#7873)
devops-cli-service commentedon Nov 30, 2026
Released in v0.261.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.261.2
devops-cli-service commentedon Nov 30, 2026
Live since 2026-11-30 20:54 UTC