fix: bump github provider floor to 6.8.0 for fork support (STS-1942) - #5
Merged
Merged
Conversation
fork/source_owner/source_repo were wired into github_repository in a prior patch, but versions.tf still capped the integrations/github provider at < 6.0. Those arguments only exist from provider 6.8.0 onward, so the constraint made them unresolvable, breaking downstream applies with `An argument named "fork" is not expected here`. Bump the floor to >= 6.8.0, < 7.0 in versions.tf and in the test/unit-complete and examples/public-repository fixtures, which each had their own separate, stricter constraints capping them below 6.0. Also drop the now-stale "branch_protections_v3 broken in >= 5.3" comments/exclusions (that provider bug predates and is unrelated to this floor) and update README's provider-compatibility claims.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
oycyc
approved these changes
Sep 1, 2026
…restrict_pushes; add validate CI job
Running `terraform validate` locally against the bumped provider (something CI
can't currently do, since it's never actually executed on this fork) surfaced
a real, separate schema break: github_branch_protection's top-level
blocks_creations/push_restrictions arguments were replaced by a nested
restrict_pushes { blocks_creations, push_allowances } block in provider 6.x.
Fix the resource block accordingly; var.branch_protections_v4's public shape
is unchanged.
Also add a `validate` CI job that runs `terraform init`/`validate` (no
credentials needed) across the root module and test/unit-complete, so this
class of bug gets caught automatically going forward.
…-1942) README.md is generated from README.tfdoc.hcl via terradoc; the provider badge/prose bump in an earlier commit only touched the generated file, so CI's terradoc-generate pre-commit hook failed (regenerating from the stale template reverted it). Fix the template itself (badge image, compatibility prose, and a dangling footer ref, all previously pinned to 4.10+/v4.20) and regenerate README.md, confirmed idempotent against terradoc generate/validate/fmt. Regenerating also picked up an unrelated pre-existing gap: PR #4 added fork/source_owner/source_repo without ever running terradoc generate, so the README's TOC and body were missing the Fork Configuration section entirely. That's now included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #4 wired
fork/source_owner/source_repointogithub_repository.repository, butversions.tfstill capped theintegrations/githubprovider at< 6.0. Those arguments only exist in the provider from6.8.0onward, so no version could satisfy both constraints — downstream applies fail withAn argument named "fork" is not expected here.versions.tfprovider floor to>= 6.8.0, < 7.0.test/unit-complete/provider.tfandexamples/public-repository/provider.tf, which each had their own separate (stricter) constraints capping below 6.0.branch_protections_v3 broken in >= 5.3comments/version exclusions — that provider bug predates and is unrelated to this floor. Verified against the provider source at tagv6.13.0thatgithub_branch_protection_v3's schema is unchanged for every field this module sets, so no changes were needed there.terraform validatelocally:github_branch_protection's (branch_protections_v4) top-levelblocks_creations/push_restrictionsarguments were replaced by a nestedrestrict_pushes { blocks_creations, push_allowances }block in provider 6.x.var.branch_protections_v4's public input shape is unchanged.validateCI job (root module +test/unit-complete, no credentials required) so provider-schema mismatches like this get caught automatically going forward — worth noting this repo'sunit-testsCI job has never actually executed (0 Actions runs in its history, noTEST_GITHUB_TOKEN/TEST_GITHUB_ORGANIZATIONsecrets configured), so this is currently the only automated signal this repo has.examples/public-repositoryis excluded from the new job's matrix since it pulls the publishedmineiros-io/repository/githubregistry module (not this local module) with its own old, unrelated provider pin — pre-existing and out of scope here.[Unreleased].Verification
Ran
terraform init/validatelocally via Docker (hashicorp/terraform:1.9,--platform linux/amd64to match CI runners) against the root module andtest/unit-completewith the bumped>= 6.8.0, < 7.0constraint — both pass cleanly (aside from a pre-existing, unrelated deprecation warning ongithub_repository_project, since GitHub removed the classic Projects API). This is the same check the newvalidateCI job runs.Ticket
STS-1942
Paired with Claude Code