This is an automated email from the ASF dual-hosted git repository.
slawekjaranowski pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
The following commit(s) were added to refs/heads/main by this push:
new 20a165e Replace protected branches with rulesets
20a165e is described below
commit 20a165e0eedec28421618a729c3af58810b6f288
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Tue Nov 10 21:27:31 2026 +0100
Replace protected branches with rulesets
Protect main and v5 against deletion and force push,
make v1-v4 read-only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.asf.yaml | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 39fe1d3..ac6931e 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -12,13 +12,27 @@ github:
squash: true
merge: false
rebase: true
- protected_branches:
- main: { }
- v1: { }
- v2: { }
- v3: { }
- v4: { }
- v5: { }
+ rulesets:
+ - name: "Branch Protection"
+ type: branch
+ branches:
+ includes:
+ - "~DEFAULT_BRANCH"
+ - "v5"
+ - name: "Read-only Branches"
+ target: branch
+ enforcement: active
+ conditions:
+ ref_name:
+ include:
+ - "refs/heads/v1"
+ - "refs/heads/v2"
+ - "refs/heads/v3"
+ - "refs/heads/v4"
+ exclude: []
+ rules:
+ - type: deletion
+ - type: update
pull_requests:
del_branch_on_merge: true
features: