Skip to content

refactor: delete the settings file and its schema of the template #11

Backlog

Description

@dan-petty

Problem

ADR 0041 of dan-petty/devops-cli (dan-petty/devops-cli#7497) gives the repository settings to OpenTofu, and devops repos onboard no longer reads github/repository.yaml. The template still renders that file with raw REST bodies (templates/repository/github/repository.yaml.jinja, 119 lines) and keeps a hand-written schema (templates/github-repository.schema.json, 391 lines).

Change

  • Delete templates/repository/github/repository.yaml.jinja and templates/github-repository.schema.json.
  • Delete the questions required_checks and code_coverage of copier.yml, which only fed that file. tf/github/<owner>/repositories.yaml of the roots holds the required checks.
  • Correct templates/README.md and each document that names the file.
  • Release. Renovate brings the release to each consumer, and copier update deletes github/repository.yaml there.

Existing tool considered

Copier (MIT), which already renders the template. The variable types of the OpenTofu module replace the schema.

Done when

  • copier copy of the template gives no github/repository.yaml, and the checks of the repository pass.

Dependencies

Source

Source: dan-petty/devops-cli#7497

Alternatives check of 2026-12-01: not-applicable.
Class: refactor, no model call.
Tool: none found.

Proposed design

Problem statement

ADR 0041 of dan-petty/devops-cli gives the repository settings to OpenTofu, and devops repos onboard no longer reads github/repository.yaml. The template still renders that file with raw REST bodies and keeps a hand-written JSON Schema. This change deletes the rendered file and its schema, and removes the two questions that fed them. It corrects each document that names them, and it releases the template so that copier update deletes the file in each consumer.

Acceptance criteria

Requirement: Template renders no settings baseline

The template SHALL render no github/repository.yaml.

Scenario: Render the default answers

  • WHEN The template test renders the template with the default answers.
  • THEN mise exec -- tests/test-repository-template.sh passes, and the file set of the render holds no github/repository.yaml.

Requirement: No schema of the settings baseline

The repository MUST hold no templates/github-repository.schema.json.

Scenario: Search the template and its test

  • WHEN A person runs git grep -n github-repository.schema.json -- templates tests.
  • THEN The command prints no line.

Requirement: No question of the settings baseline

copier.yml MUST hold no question required_checks and no question code_coverage.

Scenario: Render the default answers

  • WHEN The template test renders the template with the default answers.
  • THEN The test passes, and .copier-answers.yml of the render holds no key required_checks and no key code_coverage.

Requirement: Documents name no deleted item

templates/README.md and github/repository.yaml MUST NOT name the deleted files or the deleted questions.

Scenario: Search the documents

  • WHEN A person runs git grep -n -e github/repository.yaml -e github-repository.schema.json -e required_checks -e code_coverage -- templates/README.md github/repository.yaml.
  • THEN The command prints no line.

Requirement: Spec states no required checks answer

The spec template-file-owners MUST hold no requirement or scenario about the answer required_checks or the ruleset of github/repository.yaml.

Scenario: Search the specs

  • WHEN A person runs git grep -n -e required_checks -e github/repository.yaml -- openspec/specs/.
  • THEN The command prints no line.

Requirement: Pending a person after the merge

The release MUST reach each consumer with copier update.

Scenario: The release pull request merges

  • WHEN A person merges the release pull request of release-please.
  • THEN The new tag vX.Y.Z renders no github/repository.yaml, and the next Renovate copier update of a consumer deletes its github/repository.yaml.

Existing Tool Considered

No alternatives check has run. Copier (MIT) covers the render of the template and needs no change, because this change deletes one rendered file and adds no code. The variable types of the OpenTofu module that holds tf/github/<owner>/repositories.yaml replace the hand-written JSON Schema (ADR 0041, dan-petty/devops-cli#7497). No part of the need is missing from Copier. The change writes no code to keep, so the cost is zero tokens and zero days.

Key questions

  • Which files name the settings baseline, its schema or its two questions?: copier.yml defines required_checks at line 132 and code_coverage at line 145. templates/README.md names the file and the two questions in its introduction, its question table, its file table, its Owners section, its Settings baseline section and its Test section. openspec/specs/template-file-owners/spec.md:32 states the required checks of the ruleset. github/repository.yaml names templates/github-repository.schema.json in its header comment. tests/test-repository-template.sh renders the two answers and runs check-jsonschema on the rendered file. [sources: copier.yml:132, copier.yml:145, templates/README.md, openspec/specs/template-file-owners/spec.md:32, github/repository.yaml, tests/test-repository-template.sh]
  • Does the template test render or validate github/repository.yaml?: Yes. tests/test-repository-template.sh renders the template with the answers required_checks and code_coverage, asserts each required check of the rendered ruleset, and runs check-jsonschema on the rendered github/repository.yaml with github-repository.schema.json (templates/README.md, "Test"). This change removes these cases, and the test must pass with no settings baseline in the render. [sources: templates/README.md, tests/test-repository-template.sh]
  • Does this change delete github/repository.yaml at the root of this repository?: No. Keep the root file and remove its sentence about the deleted schema. The issue deletes the settings file of the template only. The root file is the settings baseline of this repository, and a person keeps it (templates/README.md, "Owners"). Its removal is a separate change. (best practice) [sources: github/repository.yaml, templates/README.md]
    • Chosen: Keep the root file and correct its comment. The issue scopes the deletion to the template, and the root file is the baseline of this repository.
    • Rejected: Delete the root file too. The issue limits the deletion to the template, and the settings of this repository are outside its scope.
  • Which Conventional Commit type gives the release that carries the deletion?: fix. release-please gives no version bump for a refactor type by default, so the deletion would wait for another release. A fix type gives a patch release. The change is not breaking, because a rendered repository takes the deletion with copier update, so no ! is needed. (best practice) [sources: AGENTS.md, templates/README.md]
    • Chosen: fix. It gives a patch release, and the change is not breaking.
    • Rejected: refactor. release-please gives no version bump for this type by default, so the deletion would not reach the consumers.
    • Rejected: refactor!. A major release is too large, because a rendered repository takes the deletion with copier update.

Fit

Fits in one pull request.

Suspected block

The release of dan-petty/devops-cli that holds ADR 0041 (dan-petty/devops-cli#7497) must land first, so that devops repos onboard no longer reads github/repository.yaml.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 28, 2026

    @dan-petty
    OwnerAuthor
  2. added
    type/refactor
    status/new
    value/medium
    effort/low
    source/agent
    priority/p2-medium
    on Nov 28, 2026
  3. added a commit that references this issue on Nov 28, 2026
  4. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agentstatus/newtype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions