Skip to content

feat!: expose repository settings and merge controls - #8

Merged
josmo merged 3 commits into
mainfrom
feat/repository-settings
Aug 16, 2026
Merged

feat!: expose repository settings and merge controls #8
josmo merged 3 commits into
mainfrom
feat/repository-settings

Conversation

@josmo

@josmo josmo commented Aug 16, 2026

Copy link
Copy Markdown
Member

Exposes the repository settings that were hardcoded in modules/repository, lifting them onto the repositories input as optional fields. Every field defaults to current/provider behavior, so existing
configurations see no plan changes
.

Added

  • Repo settings: topics, homepage_url, has_issues, has_wiki, has_projects, has_downloads, is_template, gitignore_template, license_template, archived, archive_on_destroy
  • Create-from-template: template = { owner, repository, include_all_branches }
  • Granular merge controls: allow_merge_commit, allow_squash_merge, allow_rebase_merge, allow_auto_merge, delete_branch_on_merge, merge_commit_message, merge_commit_title
  • default_branch via a dedicated github_branch_default resource (setting it on the repository is deprecated)
  • Validation: rejects a repository with all three merge methods disabled (GitHub only errors on this at apply time)

Breaking change

unsafe_merges is removed:

# before                                                                                                                                                                                                          
unsafe_merges = true                                                                                                                                                                                              
# after                                                                                                                                                                                                           
allow_squash_merge = true                                                                                                                                                                                         
allow_rebase_merge = true         

josmo added 3 commits August 15, 2026 20:37
Bump the pinned terraform-docs in the pre-commit workflow and regenerate
the module and example READMEs so local and CI output match.
Lift the github_repository attributes that were hardcoded in
modules/repository into the `repositories` input as optional fields, each
defaulting to the previous behavior so existing configurations plan with no
changes.

New fields: topics, homepage_url, has_issues, has_wiki, has_projects,
has_downloads, is_template, gitignore_template, license_template, archived,
archive_on_destroy, template (create-from-template), and granular merge
controls (allow_merge_commit, allow_squash_merge, allow_rebase_merge,
allow_auto_merge, delete_branch_on_merge, merge_commit_message,
merge_commit_title). default_branch is managed via a new
github_branch_default resource, since setting it on the repository is
deprecated.

Add a plan-time validation rejecting a repository with all three merge
methods disabled, and terraform test coverage for the defaults, setting
pass-through, the default_branch resource, and the new validation. Mirror
the object into the root variable and note the planned squash-merge default
in docs/DESIGN.md.

BREAKING CHANGE: `unsafe_merges` is removed. Replace `unsafe_merges = true`
with `allow_squash_merge = true` and/or `allow_rebase_merge = true`.
The hcledit and terraform-docs release tarballs bundle LICENSE and
README.md alongside the binary. Extracting the whole archive in the repo
root overwrote the repository's own LICENSE/README in the CI runner and
broke the terraform_docs hook. Extract only the binary.
@josmo
josmo merged commit 586dda8 into main Aug 16, 2026
5 checks passed
@josmo
josmo deleted the feat/repository-settings branch August 16, 2026 17:13
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