Skip to content

Commit f83faca

Browse files
Fix CodeQL analysis step to correctly handle non-pull request contexts
1 parent 2fcdce0 commit f83faca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

circle_ci/codeql_analysis_pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
https://api.github.com/repos/${REPO_PATH}/pulls/${PR_NUMBER} \
3737
| jq -r .base.ref)
3838
REF=refs/pull/${PR_NUMBER}/merge
39+
else
40+
echo "Running in a non-pull request context"
41+
BASE_REF=$CIRCLE_BRANCH
42+
REF="HEAD^"
3943
fi
4044
printenv
4145
curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user

0 commit comments

Comments
 (0)