From 4e9f0152125d678aec953f49435e3ec233b325f4 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Sat, 31 Jan 2026 16:56:16 +0000 Subject: [PATCH 1/2] feat(sage-settings): add repo settings to prevent deletion of default branch * and squashing of commits --- safe-settings/settings.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/safe-settings/settings.yml b/safe-settings/settings.yml index 2dbe5a8..f36401c 100644 --- a/safe-settings/settings.yml +++ b/safe-settings/settings.yml @@ -1,4 +1,26 @@ +# See https://github.com/github/safe-settings/tree/main-enterprise/docs/sample-settings for example settings +# and https://docs.github.com/en/rest/reference/repos#update-a-repository for +# the GitHub REST API definitions + repository: + # As we use `semantic-release` throughout the formulas, which means every + # commit message is important, we disallow squash merging so that commit + # messages are not missed. + # In addition, Renovate defaults to squash merging unless the repository + # settings disallows it. + allow_squash_merge: false + rulesets: + - name: Prevent destruction of the default branch + target: branch + enforcement: active + conditions: + ref_name: + include: + - ~DEFAULT_BRANCH + exclude: [] + rules: + - type: deletion + - type: non_fast_forward topics: - template - salt-formula From b68b23d973b08164e1251ec703e352937223e79d Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Sat, 31 Jan 2026 17:17:53 +0000 Subject: [PATCH 2/2] chore: wording --- safe-settings/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/safe-settings/settings.yml b/safe-settings/settings.yml index f36401c..05ac975 100644 --- a/safe-settings/settings.yml +++ b/safe-settings/settings.yml @@ -5,7 +5,7 @@ repository: # As we use `semantic-release` throughout the formulas, which means every # commit message is important, we disallow squash merging so that commit - # messages are not missed. + # messages are not inadvertently destroyed. # In addition, Renovate defaults to squash merging unless the repository # settings disallows it. allow_squash_merge: false