Skip to content

Commit 7289a20

Browse files
committed
Fix quality monitor checkout step
1 parent 31c99ee commit 7289a20

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.github/workflows/quality-monitor.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Quality Monitor PR'
22

33
on:
4-
pull_request:
4+
pull_request_target:
55

66
jobs:
77
build:
@@ -10,7 +10,16 @@ jobs:
1010
name: Build, test and monitor quality on Ubuntu
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: 'Checkout merge commit'
14+
uses: actions/checkout@v4
15+
with:
16+
ref: "${{ github.event.pull_request.merge_commit_sha }}"
17+
if: github.event.pull_request.merge_commit_sha != ''
18+
- name: 'Checkout PR head commit'
19+
uses: actions/checkout@v4
20+
with:
21+
ref: "${{ github.event.pull_request.head.sha }}"
22+
if: github.event.pull_request.merge_commit_sha == ''
1423
- name: Set up JDK 21
1524
uses: actions/setup-java@v4
1625
with:
@@ -31,7 +40,7 @@ jobs:
3140
env:
3241
BROWSER: chrome-container
3342
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
34-
run: mvn -V --color always -ntp clean verify -Ppit -Pci -Powasp | tee maven.log
43+
run: mvn -V --color always -ntp clean verify -Pci -Powasp | tee maven.log
3544
- name: Extract pull request number
3645
uses: jwalton/gh-find-current-pr@v1
3746
id: pr
@@ -125,23 +134,6 @@ jobs:
125134
"pattern": "**/target/site/jacoco/jacoco.xml"
126135
}
127136
]
128-
},
129-
{
130-
"name": "Mutation Coverage",
131-
"tools": [
132-
{
133-
"id": "pit",
134-
"metric": "mutation",
135-
"sourcePath": "src/main/java",
136-
"pattern": "**/target/pit-reports/mutations.xml"
137-
},
138-
{
139-
"id": "pit",
140-
"metric": "test-strength",
141-
"sourcePath": "src/main/java",
142-
"pattern": "**/target/pit-reports/mutations.xml"
143-
}
144-
]
145137
}
146138
],
147139
"metrics":

0 commit comments

Comments
 (0)