Skip to content

Commit

Permalink
(Hopefully) allow Qodana to be run on PRs coming from forks
Browse files Browse the repository at this point in the history
Changed the workflow that invokes Qodana to always run the GHA workflow that is part of the target branch (using the pull_request_target)
  • Loading branch information
dennisdoomen committed Aug 13, 2023
1 parent ded8a02 commit 391d107
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/code_quality.yml
@@ -1,7 +1,8 @@
name: Qodana

on:
pull_request:
workflow_dispatch:
pull_request_target:
push:
branches:
- master
Expand All @@ -14,9 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@main
uses: JetBrains/qodana-action@v2023.2
with:
upload-result: ${{ github.ref_name == 'master' || github.ref_name == 'develop' }}
args: --baseline,qodana.sarif.json
Expand Down

0 comments on commit 391d107

Please sign in to comment.