From 7111109ac0c64d931bfc94feaf32869271869c52 Mon Sep 17 00:00:00 2001
From: Marcel Hibbe <dev@mhibbe.de>
Date: Tue, 17 Jun 2025 11:24:01 +0200
Subject: [PATCH] Try to run analysis also for merge commits

Trying to fix
https://github.com/nextcloud/android-config/pull/248/files

which caused that analysis is not only blocked for forks, bit also for merge commits.

Solution: If it's not a PR the step should be omitted..

This commit will be checked when workflow runs on github. It will be merged just to test it's working..

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
---
 .github/workflows/analysis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml
index 909d9deb7..59b5910d0 100644
--- a/.github/workflows/analysis.yml
+++ b/.github/workflows/analysis.yml
@@ -29,7 +29,7 @@ jobs:
         runs-on: ubuntu-latest
         steps:
             - name: Disabled on forks
-              if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
+              if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
               run: |
                   echo 'Can not analyze PRs from forks'
                   exit 1