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

ppkarwasz pushed a commit to branch feat/protect-branches
in repository https://gitbox.apache.org/repos/asf/logging-flume.git

commit 89956e59f88d2a89312ab05e97a06665f7377468
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Tue May 19 21:32:15 2026 +0200

    Add branch protection rulesets
    
    Adds branch protection rulesets, similar to other Logging repos:
    
    - One approval is required for the merge,
    - The `ubuntu-latest` build must succeed.
---
 .asf.yaml | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 62 insertions(+), 5 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 6f32cadd8..82f9e1e6b 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -24,9 +24,6 @@ notifications:
 github:
   description: "Apache Flume is a distributed, reliable, and available service 
for efficiently collecting, aggregating, and moving large amounts of log-like 
data"
   homepage: https://flume.apache.org/
-  features:
-    issues: true
-  del_branch_on_merge: true
   autolink_jira:
     - FLUME
   labels:
@@ -36,5 +33,65 @@ github:
     - jvm
     - library
     - flume
-  protected_branches:
-    main: {}
+
+  # Pull Request settings:
+  # https://github.com/apache/infrastructure-asfyaml#pull-request-settings
+  pull_requests:
+    # allow auto-merge
+    allow_auto_merge: true
+    # enable updating head branches of pull requests
+    allow_update_branch: true
+    # auto-delete head branches after being merged
+    del_branch_on_merge: true
+
+  # Enforce squashing while merging PRs.
+  # Otherwise, the git log gets polluted severely.
+  enabled_merge_buttons:
+    squash: true
+    merge: false
+    rebase: false
+
+  features:
+    issues: true
+
+  # Disable protected branches, since we use rulesets now
+  protected_branches: ~
+
+  rulesets:
+    - name: "Branch protection"
+      type: branch
+      branches:
+        includes:
+          - "~DEFAULT_BRANCH"
+      # All reviews must be addressed before merging
+      required_conversation_resolution: true
+      # Require checks to pass before merging
+      required_status_checks:
+        # The GitHub Actions app
+        - app_slug: github-actions
+          name: "build (ubuntu-latest)"
+        # The GitHub Advanced Security app
+        - app_slug: github-advanced-security
+          name: "CodeQL"
+      # At least one positive review must be present
+      required_pull_request_reviews:
+        required_approving_review_count: 1
+    # Use raw rules, until a convenience notation for `restrict_update` is 
introduced.
+    # See: https://github.com/apache/infrastructure-asfyaml/issues/96
+    #
+    # 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: "Tag protection"
+      target: tag
+      enforcement: active
+      bypass_actors: []
+      conditions:
+        ref_name:
+          include:
+            - "refs/tags/rel/*"
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: update
+

Reply via email to