feat!: expose repository settings and merge controls - #8
Merged
Conversation
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.
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.
Exposes the repository settings that were hardcoded in
modules/repository, lifting them onto therepositoriesinput as optional fields. Every field defaults to current/provider behavior, so existingconfigurations see no plan changes.
Added
topics,homepage_url,has_issues,has_wiki,has_projects,has_downloads,is_template,gitignore_template,license_template,archived,archive_on_destroytemplate = { owner, repository, include_all_branches }allow_merge_commit,allow_squash_merge,allow_rebase_merge,allow_auto_merge,delete_branch_on_merge,merge_commit_message,merge_commit_titledefault_branchvia a dedicatedgithub_branch_defaultresource (setting it on the repository is deprecated)Breaking change
unsafe_mergesis removed: