This is an automated email from the ASF dual-hosted git repository. pkarwasz pushed a commit to branch feat/rulesets in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit bcb9e1c11c56e60ed35ca88d518e7ace8d1eb2b8 Author: Piotr P. Karwasz <[email protected]> AuthorDate: Tue Apr 14 22:34:20 2026 +0200 Switches from `protected_branches` to `rulesets` Similarly to apache/logging-parent#456 this PR switches from GitHub Branch Protection to Rulesets and: - Keeps the same rules for `main`, while protection `2.x` is **temporarily** disabled in case we need to update the `.asf.yaml` file. - Adds tag protection for the `rel/*` tags. --- .asf.yaml | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 1a37fb4923..2b1beead63 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -18,6 +18,13 @@ # `.asf.yaml` is a branch-specific YAML configuration file for Git repositories to control features such as notifications, GitHub settings, etc. # See its documentation for details: https://github.com/apache/infrastructure-asfyaml +# +# Additional non-standard features +# +meta: + environments: + - github_rulesets + # Bare minimum `notifications` to # # 1. Forward GitHub _activity_ to `notifications@` @@ -72,35 +79,32 @@ github: merge: false rebase: false - # Enforce Review-then-Commit - protected_branches: - 2.x: - # All reviews must be addressed before merging - required_conversation_resolution: true - # Require checks to pass before merging - required_status_checks: - checks: - # The GitHub Actions app: 15368 - - app_id: 15368 - context: "build / build (ubuntu-latest)" - # The GitHub Advanced Security app: 57789 - - app_id: 57789 - context: "CodeQL" - # At least one positive review must be present - required_pull_request_reviews: - required_approving_review_count: 1 - main: + # Clear Protected Branches configuration: it is replaced by GitHub Rulesets + protected_branches: { } + + rulesets: + # Enforce Review-then-Commit + - name: "Branch protection" + type: branch + branches: + includes: + - "main" # All reviews must be addressed before merging required_conversation_resolution: true # Require checks to pass before merging required_status_checks: - checks: - # The GitHub Actions app: 15368 - - app_id: 15368 - context: "build / build (ubuntu-latest)" - # The GitHub Advanced Security app: 57789 - - app_id: 57789 - context: "CodeQL" + # The GitHub Actions app + - app_slug: github-actions + name: "build / build (ubuntu-latest)" + # The GitHub Advanced Security + - app_slug: github-advanced-security + name: "CodeQL" # At least one positive review must be present required_pull_request_reviews: required_approving_review_count: 1 + # Protect tags + - name: "Tag protection" + type: tag + branches: + includes: + - "rel/*"
