From 60816544b85da4af0f55185dbdf243fbe9b1d63b Mon Sep 17 00:00:00 2001 From: alkoleft Date: Tue, 21 May 2024 23:45:53 +0300 Subject: [PATCH] fix job --- .github/workflows/sq-pr.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sq-pr.yml b/.github/workflows/sq-pr.yml index ced5177f0..8cc4e1fcd 100644 --- a/.github/workflows/sq-pr.yml +++ b/.github/workflows/sq-pr.yml @@ -1,6 +1,6 @@ name: Анализ в SonarQube (pull-request) -on: [pull_request_target] +on: [pull_request] jobs: SonarScanner: @@ -9,13 +9,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - repository: ${{ github.event.workflow_run.head_repository.full_name }} - ref: ${{ github.event.workflow_run.head_branch }} - fetch-depth: 0 + # https://github.com/android-password-store/Android-Password-Store/pull/1247 + ref: refs/pull/${{ github.event.pull_request.number }}/merge # https://docs.sonarqube.org/latest/analysis/pull-request/ - name: Анализ в SonarQube (pull-request) - if: github.event_name == 'pull_request' uses: alkoleft/sonar-quality-gate@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -24,5 +22,5 @@ jobs: SONAR_URL: https://sonar.openbsl.ru SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_REPOSITORY: bia-technologies/yaxunit - CI_MERGE_REQUEST_IID: ${{ github.event.pull_request.number }} + CI_MERGE_REQUEST_IID: ${{ github.event.number }} DEBUG: ${{ runner.debug }}