This is an automated email from the ASF dual-hosted git repository.

ppkarwasz pushed a commit to branch fix/asf-yaml
in repository https://gitbox.apache.org/repos/asf/logging-log4net-site.git

commit bfa4d602b51300ea96b10d7b3ff406d9b983401c
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Sun May 17 11:58:15 2026 +0200

    Fixes `.asf.yaml` and update protection rules
    
    The automatic PR #2 did create any protection rules, since the update
    failed:
    
    https://lists.apache.org/thread/pqf7s9t1y0ctqpyjj8x0j3wtzrx8x5gt
    
    This PR:
    
    - Removes the invalid `profile` key from the `publish` object that
      caused the update to fail.
    - Adds `asf-site` to the branches protected from deletion and history
      rewriting. It also removes the `rel/*` and `release/*` patterns that
      don't exist in this repo.
    - Adds a rule for `asf-staging`, but only protects it from deletion.
    - Disables tags: we don't use them in this repo.
---
 .asf.yaml | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index f4af9ba..52a115c 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -10,20 +10,42 @@ staging:
   subdir: log4net
 
 publish:
-  profile:
   whoami: asf-site
   subdir: log4net
+
 github:
   rulesets:
+    # Default rules preventing deletion and force-push
     - name: "Default Branch Protection"
       type: branch
       branches:
         includes:
           - "~DEFAULT_BRANCH"
-          - "release/*"
-          - "rel/*"
-        excludes: []
+          - "asf-site"
+      bypass_teams:
+        - root
+    # Staging branch allows force-pushes
+    - name: "Staging Branch Protection"
+      type: branch
+      branches:
+        includes:
+          - "asf-staging"
+      bypass_teams:
+        - root
+      restrict_force_push: false
+    # There is no convenience notation for `creation` and `update`, so we need 
to use the raw rule syntax.
+    #
+    # The raw rules need to follow the syntax given in:
+    # 
https://docs.github.com/en/rest/repos/rules?apiVersion=2026-03-10#update-a-repository-ruleset
+    - name: "No tags"
+      type: tag
+      branches:
+        includes:
+          - "*"
       bypass_teams:
         - root
-      restrict_deletion: true
-      restrict_force_push: true
+      rules:
+        - type: creation
+        - type: deletion
+        - type: non_fast_forward
+        - type: update

Reply via email to