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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a551c05876 [chore](ci) Add ASF rulesets for branch protection (#71100)
0a551c05876 is described below

commit 0a551c058764c41bd00ffd6d29833d8152e544e3
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Sat Nov 28 21:37:44 2026 +0800

    [chore](ci) Add ASF rulesets for branch protection (#71100)
    
    ### Background
    
    ASF reads `.asf.yaml` from the default branch and applies it to GitHub.
    Doris requires both GitHub Actions check runs and TeamCity commit
    statuses. The current classic protection matches those results by
    context name.
    
    ### What problem does this PR solve?
    
    Issue Number: None
    Related PR: #71101 (removes classic protection after rollout),
    apache/doris-website#4729 (fixed the website ruleset)
    PR Type: Build/CI/Chore
    
    Problem Summary:
    
    Install GitHub rulesets for `master` and seven release branches. ASF
    converts a bare required check in its convenience syntax to
    `integration_id: -1`, which GitHub has rejected during ruleset
    installation. Use the raw ruleset syntax with context-only entries so
    both CI systems can keep reporting the required results. [Related ASF
    synchronization failure](https://github.com/apache/iggy-website/pull/74)
    ยท [GitHub ruleset
    
API](https://docs.github.com/en/rest/repos/rules#create-a-repository-ruleset)
    
    ### Details
    
    - **Affected:** GitHub branch protection for `master` and seven release
    branches in `.asf.yaml`.
    - **Developer and release impact:** The six rulesets carry the existing
    review policies and 103 required check entries across eight branches.
    Classic protection remains in force during rollout.
    - **Behavior change:** GitHub will enforce the declared rules on the
    covered release branches once ASF installs the rulesets.
    - **License and third-party:** None.
    - **Rollback:** Revert the ruleset addition before removing classic
    protection.
    
    ### Testing
    
    - Passed `asfyaml-validate --repo . --branch master` and `git diff
    --check` on macOS.
    - Compared the ASF-normalized payloads before and after the revision.
    The candidate omits the invalid integration ID and preserves the branch
    targets, review settings, and checks from the classic configuration.
    - Confirmed from a merged PR that TeamCity publishes commit statuses and
    GitHub Actions reports the `License Check` check run. [Sample
    PR](https://github.com/apache/doris/pull/70746/checks)
    
    ### Notes for Reviewers
    
    Earlier samples showed all configured checks for `branch-4.1` and
    `branch-4.0`. They showed incomplete coverage for `branch-4.2`,
    `branch-3.0`, and `branch-2.0`, and there was no recent merged PR to
    check for `branch-3.1` or `branch-2.1`. Confirm the release check
    coverage before rollout, then verify the rules in GitHub before merging
    #71101.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Behavior changed: Yes (see Details)
    - Does this need documentation: No
    - Pre-submission status: Partially verified: live ASF reconciliation and
    full release CI coverage remain to be verified.
    
    ### AI Disclosure
    
    - Tool: OpenAI Codex
    - Generated: Ruleset configuration, local validation script, and PR
    description.
    - Human review: Pending for this revision.
    
    ---------
    
    Co-authored-by: morningman <[email protected]>
---
 .asf.yaml | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 214 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index b38cddd7339..0a34d3cb3e6 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -41,6 +41,220 @@ github:
     squash:  true
     merge:   false
     rebase:  false
+  rulesets:
+    # Context-only checks preserve the existing GitHub Actions and TeamCity 
status matching.
+    # Performance reports results without gating these branches.
+    - name: Master branch protection
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/master
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: true
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: Check for secrets
+              - context: Clang Formatter
+              - context: CheckStyle
+              - context: TeamCity/p0
+              - context: TeamCity/nonconcurrent
+              - context: TeamCity/external
+              - context: TeamCity/cloud_p0
+              - context: TeamCity/vault_p0
+              - context: TeamCity/feut
+              - context: TeamCity/beut
+              - context: Build Third Party Libraries (Linux)
+              - context: Build Third Party Libraries (macOS)
+              - context: Build Third Party Libraries (macOS-arm64)
+              - context: TeamCity/compile
+              - context: code-review
+              - context: TeamCity/cloudut
+    - name: Release branches 4.2 and 4.1
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/branch-4.2
+            - refs/heads/branch-4.1
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: true
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: Clang Formatter
+              - context: CheckStyle
+              - context: Build Broker
+              - context: TeamCity/feut
+              - context: TeamCity/beut
+              - context: TeamCity/cloudut
+              - context: TeamCity/compile
+              - context: TeamCity/p0
+              - context: TeamCity/nonconcurrent
+              - context: TeamCity/external
+              - context: TeamCity/cloud_p0
+              - context: TeamCity/vault_p0
+    - name: Release branch 4.0
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/branch-4.0
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: true
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: Clang Formatter
+              - context: CheckStyle
+              - context: Build Broker
+              - context: FE UT (Doris FE UT)
+              - context: BE UT (Doris BE UT)
+              - context: Cloud UT (Doris Cloud UT)
+              - context: COMPILE (DORIS_COMPILE)
+              - context: P0 Regression (Doris Regression)
+              - context: NonConcurrent Regression (nonConcurrent)
+              - context: External Regression (Doris External Regression)
+              - context: cloud_p0 (Doris Cloud Regression)
+              - context: vault_p0 (Doris Cloud Regression)
+    - name: Release branches 3.1 and 3.0
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/branch-3.1
+            - refs/heads/branch-3.0
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: true
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: Clang Formatter
+              - context: CheckStyle
+              - context: Build Broker
+              - context: Build Third Party Libraries (Linux)
+              - context: FE UT (Doris FE UT)
+              - context: BE UT (Doris BE UT)
+              - context: Cloud UT (Doris Cloud UT)
+              - context: COMPILE (DORIS_COMPILE)
+              - context: P0 Regression (Doris Regression)
+              - context: NonConcurrent Regression (nonConcurrent)
+              - context: External Regression (Doris External Regression)
+              - context: cloud_p0 (Doris Cloud Regression)
+              - context: vault_p0 (Doris Cloud Regression)
+    - name: Release branch 2.1
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/branch-2.1
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: true
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: CheckStyle
+              - context: Build Broker
+              - context: Build Third Party Libraries (Linux)
+              - context: COMPILE (DORIS_COMPILE)
+              - context: External Regression (Doris External Regression)
+              - context: FE UT (Doris FE UT)
+              - context: BE UT (Doris BE UT)
+              - context: P0 Regression (Doris Regression)
+    - name: Release branch 2.0
+      target: branch
+      enforcement: active
+      conditions:
+        ref_name:
+          include:
+            - refs/heads/branch-2.0
+          exclude: []
+      rules:
+        - type: deletion
+        - type: non_fast_forward
+        - type: pull_request
+          parameters:
+            required_review_thread_resolution: false
+            dismiss_stale_reviews_on_push: true
+            require_last_push_approval: false
+            require_code_owner_review: false
+            required_approving_review_count: 1
+        - type: required_status_checks
+          parameters:
+            strict_required_status_checks_policy: false
+            required_status_checks:
+              - context: License Check
+              - context: CheckStyle
+              - context: P0 Regression (Doris Regression)
+              - context: External Regression (Doris External Regression)
+              - context: FE UT (Doris FE UT)
+              - context: BE UT (Doris BE UT)
+              - context: Build Broker
+              - context: Build Third Party Libraries (Linux)
+              - context: Build Third Party Libraries (macOS)
+              - context: COMPILE (DORIS_COMPILE)
+
   protected_branches:
     # master, branch-4.2 and branch-4.1 use the migrated TeamCity contexts.
     # Performance reports results without gating these branches.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to