Skip to content

Commit

Permalink
be sure to pass head.sha
Browse files Browse the repository at this point in the history
  • Loading branch information
driftregion committed Jan 26, 2025
1 parent 4ae5fe7 commit 0f0ea69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .CodeChecker/post_to_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def main(report_path):
print("Error: GITHUB_REPOSITORY not found in environment.")
sys.exit(1)

head_sha = os.environ.get("GITHUB_SHA")
head_sha = os.environ.get("GITHUB_HEAD_SHA")
if not head_sha:
print("Error: GITHUB_SHA not found in environment.")
print("Error: GITHUB_HEAD_SHA not found in environment.")
sys.exit(1)

owner, repo = repository.split("/")
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
- name: Create Check Run with Annotations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
echo "PR HEAD is ${{ github.event.pull_request.head.sha }}"
python3 .CodeChecker/post_to_github.py report.json

0 comments on commit 0f0ea69

Please sign in to comment.