Define all GitHub rulesets as files #124

Merged
benvin merged 2 commits from benvin/github-rulesets-dir into main 2026-11-14 22:01:33 +11:00
Member

Rulesets were split between YAML files and flags that generated them inside the repository module, with reserved names and no way to apply one org-wide. All rulesets now live in ruleset/ and decide their own reach.

  • add ruleset/ files for branch-protection, tag-protection, ref-names-branch and ref-names-tag
  • add ruleset all_repos (public repos only) and mandatory fields
  • replace repo branch_protection, tag_protection, required_checks with exclude_rulesets
  • create rulesets in github_org per <repo>/<ruleset> pair after repositories, with moved blocks for .github
  • drop reserved ruleset names
Rulesets were split between YAML files and flags that generated them inside the repository module, with reserved names and no way to apply one org-wide. All rulesets now live in `ruleset/` and decide their own reach. - add `ruleset/` files for branch-protection, tag-protection, ref-names-branch and ref-names-tag - add ruleset `all_repos` (public repos only) and `mandatory` fields - replace repo `branch_protection`, `tag_protection`, `required_checks` with `exclude_rulesets` - create rulesets in `github_org` per `<repo>/<ruleset>` pair after repositories, with `moved` blocks for `.github` - drop reserved ruleset names
unkin-agent added 1 commit 2026-11-14 19:25:18 +11:00
Define all GitHub rulesets as ruleset/ files
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
5a786be0e6
Author
Member
  • modules/github_org/variables.tf:50 — nit: mandatory: true with all_repos: false is accepted but has no effect (mandatory only constrains exclude_rulesets, and opt-in via rulesets is unaffected) → add a ruleset validation requiring all_repos when mandatory, plus a test.
  • modules/github_org/variables.tf:73 — nit: removed branch_protection/tag_protection/required_checks are silently dropped by object conversion if a repo yaml still sets them (a leftover required_checks would quietly lose the check) → none set today; acceptable, or add a guard if you want it loud.
- modules/github_org/variables.tf:50 — nit: `mandatory: true` with `all_repos: false` is accepted but has no effect (mandatory only constrains `exclude_rulesets`, and opt-in via `rulesets` is unaffected) → add a ruleset validation requiring `all_repos` when `mandatory`, plus a test. - modules/github_org/variables.tf:73 — nit: removed `branch_protection`/`tag_protection`/`required_checks` are silently dropped by object conversion if a repo yaml still sets them (a leftover `required_checks` would quietly lose the check) → none set today; acceptable, or add a guard if you want it loud.
unkin-agent added 1 commit 2026-11-14 21:51:54 +11:00
Trim GitHub README section to layout and examples
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
fdc9c01baa
benvin merged commit 83f1ea6d9e into main 2026-11-14 22:01:33 +11:00
benvin deleted branch benvin/github-rulesets-dir 2026-11-14 22:01:33 +11:00
This repo is archived. You cannot comment on pull requests.