Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 870e412

Browse files
committed
Fix framework coverage commenter to use merge commit parent instead of (old) base repo SHA
1 parent 38a38fd commit 870e412

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/csv-coverage-pr-artifacts.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ jobs:
3232
- name: Clone self (github/codeql) - BASE
3333
uses: actions/checkout@v2
3434
with:
35-
ref: ${{ github.event.pull_request.base.sha }}
35+
fetch-depth: 2
3636
path: base
37+
- run: |
38+
git checkout HEAD^1
39+
git log -1 --format='%H'
40+
working-directory: base
3741
- name: Set up Python 3.8
3842
uses: actions/setup-python@v2
3943
with:
@@ -47,13 +51,13 @@ jobs:
4751
run: unzip -d codeql-cli codeql-linux64.zip
4852
- name: Generate CSV files on merge and base of the PR
4953
run: |
50-
echo "Running generator on ${{github.sha}}"
54+
echo "Running generator on merge"
5155
PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge
5256
mkdir out_merge
5357
cp framework-coverage-*.csv out_merge/
5458
cp framework-coverage-*.rst out_merge/
5559
56-
echo "Running generator on ${{github.event.pull_request.base.sha}}"
60+
echo "Running generator on base"
5761
PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base
5862
mkdir out_base
5963
cp framework-coverage-*.csv out_base/

0 commit comments

Comments
 (0)