Skip to content

Commit e61592e

Browse files
Fix SARIF upload branch ref/sha (#1445)
1 parent 4fa604f commit e61592e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/scan-bwa.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
uses: github/codeql-action/upload-sarif@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
5050
with:
5151
sarif_file: cx_result.sarif
52+
sha: ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.sha }}
53+
ref: ${{ contains(github.event_name, 'pull_request') && format('refs/pull/{0}/head', github.event.pull_request.number) || github.ref }}
5254

5355
quality:
5456
name: Quality scan

.github/workflows/scan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
5050
with:
5151
sarif_file: cx_result.sarif
52+
sha: ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.sha }}
53+
ref: ${{ contains(github.event_name, 'pull_request') && format('refs/pull/{0}/head', github.event.pull_request.number) || github.ref }}
5254

5355
quality:
5456
name: Quality scan

0 commit comments

Comments
 (0)