You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by to...@apache.org on 2021/03/17 19:31:34 UTC

[db-jdo-site] 02/02: JDO-792: Add branch protection rules

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

tobous pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/db-jdo-site.git

commit 236f2a41144aa16dc0acaaebc58dc8ef2059dd2c
Author: Tobias Bouschen <to...@googlemail.com>
AuthorDate: Mon Mar 15 14:09:45 2021 +0100

    JDO-792: Add branch protection rules
    
    Adds the following branch protection rules for the 'master' branch:
    - require a linear history (disallow merge commits)
    - require the 'build-site' action to pass before merging a PR
    
    Disables the option "Create a merge commit" for merging a PR as merge
    commits are not desired.
---
 .asf.yaml | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index b7d1f22..9bfdea3 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -13,9 +13,31 @@ github:
     - apache
     - java
 
-  # Set up branch protection for site publishing branch to avoid accidental deletion
-  # Force-pushes are still necessary as they are used to deploy new versions of the site
+  enabled_merge_buttons:
+    # disable merge button:
+    merge:   false
+    # enable squash button:
+    squash:  true
+    # enable rebase button:
+    rebase:  true
+
   protected_branches:
+    # rules for the 'master' branch
+    master:
+      # disallows pushing merge commits to the branch
+      required_linear_history: true
+
+      required_status_checks:
+        # strict means "Require branches to be up to date before merging".
+        strict: false
+        # contexts are the names of checks that must pass
+        contexts:
+          - build-site
+
+    # rules for the 'publish' branch
+    #
+    # set up branch protection for site publishing branch to avoid accidental deletion
+    # force-pushes are still necessary as they are used to deploy new versions of the site
     publish:
       allow_force_pushes: true