From d1585779840b948e2613880df6d0c953652ec836 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Sat, 28 Nov 2026 01:24:44 +0100 Subject: [PATCH] Reject merge commits in feature branches --- .forgejo/workflows/ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index e8b9622..c20d30f 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -43,6 +43,12 @@ jobs: steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 # Fetch all branches with their history for the next step + + - name: Ensure feature branches contain no merge commits + if: forgejo.ref_name != 'develop' && forgejo.ref_name != 'main' + run: "! git rev-list --merges origin/develop..HEAD | grep ." - name: Install R via system packages run: |