Skip to content
On this page

Upgrading from v1 to v2

Four breaks, all listed in the 2.0.0 changelog entry. Do the audit step before you move the pin.

1. The repository moved

v1v2
Vivswan/repo-settings-as-code@v1Vivswan/github-settings-as-code@v2

A workflow still naming the old repository fails with "repository not found". Update every uses: line, then move the pin.

2. Four keys went from inert to acting

On v1 these keys were accepted and silently ignored (a notice said so, or check mode showed permanent drift). On v2 they act on the first apply.

Keyv1v2Audit for
branches[].protection.required_signaturesRode the protection PUT, where GitHub dropped itToggles the signed-commit requirementA stale required_signatures: false REMOVES a hand-enabled requirement
actions.fork_pr_contributor_approval, actions.fork_pr_workflows_private_reposFell through to the base permissions PUT, ignoredApply the fork pull request policiesValues copied in without intent
actions.oidc_customization_subFell through to the base permissions PUT, ignoredCustomizes the OIDC subject claim templateA template that no longer matches your cloud trust policy

The changelog footers carry the full wording: required_signatures, the fork PR keys, and oidc_customization_sub.

The audit step

  1. Search every settings file for the four keys above.
  2. For each hit, decide whether the value is what you want live today. Delete the key if you are not sure: an absent key is never touched.
  3. Move the pin to @v2 with mode: check and read the drift lines. Each key that would act shows up as drift before it changes anything.
  4. Switch back to apply.

The v1 line keeps the old inert behavior, so a pin you cannot audit yet can stay on @v1 until you can.

Built from main at 1a25adbSource: docs/upgrading/v1-to-v2.md