Skip to content

Manage repository settings as code alongside the ruleset - #1

Merged
lorisleiva merged 1 commit into
mainfrom
feat/repo-settings-as-code
Aug 28, 2026
Merged

Manage repository settings as code alongside the ruleset#1
lorisleiva merged 1 commit into
mainfrom
feat/repo-settings-as-code

Conversation

@lorisleiva

Copy link
Copy Markdown
Member

This PR generalises the policy sync from branch protection only to full repository policy:

  • New repo-settings.json: the canonical repository settings applied via PATCH /repos/{org}/{repo} — squash-only merges, the trailer-preserving "Default message" squash defaults (COMMIT_OR_PR_TITLE + COMMIT_MESSAGES, which keep cherry-pick -x trailers greppable for the promote-time audit), auto-merge, and delete-branch-on-merge. This codifies the settings sweep previously done by hand in the UI and self-heals any drift on every sync.
  • sync-rulesets becomes sync-policies: one dispatch applies the settings and upserts the ruleset per repository, with a two-column summary table.
  • ruleset.json now restricts protected-branch merges to squash as belt-and-braces on top of the repo settings.

After merging, dispatch Sync policies to roll it out (expected: settings applied ×12, ruleset updated ×12, including this repository's own settings).

@lorisleiva
lorisleiva merged commit a8c5acc into main Aug 28, 2026
1 check passed
@lorisleiva
lorisleiva deleted the feat/repo-settings-as-code branch August 28, 2026 11:07
lorisleiva added a commit to codama-idl/spec that referenced this pull request Aug 28, 2026
This PR updates RELEASING.md for codama-idl/release-tools#1: the sync
workflow is now called `sync-policies` and applies both the
branch-protection ruleset and the canonical repository settings
(`repo-settings.json`).
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