feat!: generic rulesets interface with presets (org + per-repo) - #9
Merged
Conversation
Replace baseline_ruleset and require_signed_commits with a generic organization_rulesets map driving a single for_each ruleset resource.
Curated presets (require_pull_request_reviews, restrict_deletions, require_signed_commits, block_force_pushes, require_linear_history). Default enabled set reproduces prior baseline + signed-commits behavior.
BREAKING CHANGE: baseline_ruleset and require_signed_commits are removed. Use enabled_presets (defaults reproduce prior behavior) and organization_rulesets; per-repo rulesets via repositories[].rulesets.
…g module Adds enforcement, target, bypass actor_type/bypass_mode, and Team-bypass completeness validations to modules/repository's repositories.rulesets, mirroring modules/organization's organization_rulesets validations. Also documents the dead actor_id=0 on the org module's admin bypass preset, and adds a negative test for the new enforcement validation.
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.
What
Replaces the two bespoke org-ruleset knobs (
baseline_ruleset,require_signed_commits) with a single generic ruleset interface reused atthe organization and per-repository level, plus opt-in presets that are the
opinionated starting points. Default presets reproduce today's behavior, so
existing configs see no functional change beyond the input migration.
Added
organization_rulesets(generic map) +enabled_presets. Presets:require_pull_request_reviews,restrict_deletions,require_signed_commits,block_force_pushes,require_linear_history. A customorganization_rulesetsentry overrides a preset of the same name.
rulesetson therepositoriesobject →github_repository_ruleset,scoped to the repo, with team-name bypass resolution.
bypass_actors—{ actor_type, actor_id, bypass_mode }(plus aper-repo
teamname convenience);OrganizationAdmincoerced to actor_id1.enforcement,target, bypassactor_type/bypass_modeat both levels; per-repo team-existence + team-bypass checks.
Breaking change
baseline_rulesetandrequire_signed_commitsare removed.