Skip to content

Commit 4df4831

Browse files
[fix] Fix github gating authentication issue
Fix an issue with authentication of the gating script on CodeChecker server. GitHub does not pass secrets to forked repository PRs.
1 parent 09f27e7 commit 4df4831

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/codechecker_pr_analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
CODECHECKER_TOKEN: ${{ secrets.CODECHECKER_STORE_TOKEN }}
3232
PR_NUMBER: ${{ github.event.number }}
3333
run: |
34-
echo "{\"client_autologin\" : true,\"credentials\": {\"https://codechecker-demo.eastus.cloudapp.azure.com\": \"store:${CODECHECKER_TOKEN}\"}}" > ~/.codechecker.passwords.json
34+
echo "{\"client_autologin\" : true,\"credentials\": {\"https://codechecker-demo.eastus.cloudapp.azure.com\": \"demo:demo\"}}" > ~/.codechecker.passwords.json
3535
bash ./ci/github_analysis/codechecker_gate_pr.sh $GITHUB_REF

ci/github_analysis/codechecker_gate_pr.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ fi
88

99
./ci/github_analysis/pylint_analyze.sh
1010
report-converter -c -t pylint -o ./reports-pylint ./pylint-reports.json
11-
CodeChecker store -f ./reports-pylint --url "$CC_URL" --trim-path-prefix "$(pwd)" -n "$1"
12-
CodeChecker cmd diff --url "$CC_URL" -b master -n "$1" --new
11+
CodeChecker cmd diff --url "$CC_URL" -b master -n ./reports-pylint --new
1312
if [ "$?" -ne 0 ]; then
1413
echo "ERROR. YOUR PR FAILED GATING! Please check new reports at $CC_URL/reports?run=master&newcheck=$1"
1514
exit 1

0 commit comments

Comments
 (0)