Skip to content

fix: bump github provider floor to 6.8.0 for fork support (STS-1942) - #5

Merged
whyvez merged 3 commits into
mainfrom
chore/STS-1942/bump-github-provider-version
Sep 2, 2026
Merged

fix: bump github provider floor to 6.8.0 for fork support (STS-1942)#5
whyvez merged 3 commits into
mainfrom
chore/STS-1942/bump-github-provider-version

Conversation

@whyvez

@whyvez whyvez commented Sep 1, 2026

Copy link
Copy Markdown

Summary

PR #4 wired fork/source_owner/source_repo into github_repository.repository, but versions.tf still capped the integrations/github provider at < 6.0. Those arguments only exist in the provider from 6.8.0 onward, so no version could satisfy both constraints — downstream applies fail with An argument named "fork" is not expected here.

  • Bump versions.tf provider floor to >= 6.8.0, < 7.0.
  • Bump the same floor in test/unit-complete/provider.tf and examples/public-repository/provider.tf, which each had their own separate (stricter) constraints capping below 6.0.
  • Drop the now-stale branch_protections_v3 broken in >= 5.3 comments/version exclusions — that provider bug predates and is unrelated to this floor. Verified against the provider source at tag v6.13.0 that github_branch_protection_v3's schema is unchanged for every field this module sets, so no changes were needed there.
  • Fix a real, separate schema break found by running terraform validate locally: github_branch_protection's (branch_protections_v4) top-level blocks_creations/push_restrictions arguments were replaced by a nested restrict_pushes { blocks_creations, push_allowances } block in provider 6.x. var.branch_protections_v4's public input shape is unchanged.
  • Add a validate CI job (root module + test/unit-complete, no credentials required) so provider-schema mismatches like this get caught automatically going forward — worth noting this repo's unit-tests CI job has never actually executed (0 Actions runs in its history, no TEST_GITHUB_TOKEN/TEST_GITHUB_ORGANIZATION secrets configured), so this is currently the only automated signal this repo has. examples/public-repository is excluded from the new job's matrix since it pulls the published mineiros-io/repository/github registry module (not this local module) with its own old, unrelated provider pin — pre-existing and out of scope here.
  • Update README's provider-compatibility badge/prose.
  • Add CHANGELOG entries under [Unreleased].

Verification

Ran terraform init/validate locally via Docker (hashicorp/terraform:1.9, --platform linux/amd64 to match CI runners) against the root module and test/unit-complete with the bumped >= 6.8.0, < 7.0 constraint — both pass cleanly (aside from a pre-existing, unrelated deprecation warning on github_repository_project, since GitHub removed the classic Projects API). This is the same check the new validate CI job runs.

Ticket

STS-1942


Paired with Claude Code

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.
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: f885c80a-a862-4b3e-ad24-b4d19f2273e9


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…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.
@whyvez
whyvez merged commit d246977 into main Sep 2, 2026
4 of 5 checks passed
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.

2 participants