Skip to content

feat: scaffold OpenTofu and pull-request file synchronization - #13

Closed
philippwallrafen wants to merge 1 commit into
mainfrom
migration/opentofu-file-sync
Closed

philippwallrafen wants to merge 1 commit into
mainfrom
migration/opentofu-file-sync

Conversation

@philippwallrafen

@philippwallrafen philippwallrafen commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by https://github.com/pheaz/github-infra/pull/1. The replacement is in pheaz/github-infra and excludes the file-sync integration. This PR is closed without merging; pheaz/.github contents remain unchanged.


The current settings scripts and file-sync scripts mix persistent policy with direct writes that temporarily disable ruleset-baseline. This adds a staged replacement: OpenTofu imports repositories and owns the two existing settings; repo-files-sync opens PRs for the existing canonical file scopes.

  • Preserve allow_auto_merge, merge-method switches, unrelated settings, and all current rulesets. Import archived repositories read-only.
  • Generate ignored local inventory and sync configuration using GET-only discovery. Keep private target names out of committed configuration and mask them in public Actions logs.
  • Preserve canonical files, lint-pr.yml, branch cleanup, and all legacy scripts during acceptance. Automatic synchronization stays disabled until FILE_SYNC_ENABLED=true.
  • Pin the published repo-files-sync RC executable by SHA. Document pilot, backend, import, state-move, and script-retirement gates.

Validation: 10 discovery tests passed; snapshot integration covered 22 repositories (21 active, 1 archived), 20 sync targets, and 80 mappings. Workflow/generated YAML, action inputs and SHA pins, provider attribute names, Bash syntax, and whitespace checks passed. Branch cleanup and lint-pr.yml are byte-for-byte unchanged.

Draft gates: OpenTofu is unavailable in this preparation environment, so fmt/init/validate/plan and provider lockfile generation have not run. Generate and commit the provider lockfile before apply, choose durable state before shared automation, provision the dedicated sync app, and complete a live PR pilot. Provider 6.13.0 cannot represent the baseline's extra-approval parameter or repository-target lifecycle ruleset; their adoption is deferred to preserve every rule. The archived freeze and PR-based delivery are documented deliberate behavior changes. Root AGENTS.md sync remains excluded because it is not current behavior.

No settings were applied, no rulesets were disabled, and no cleanup was executed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant