Open frankwuyue opened 11 months ago
Same story for me on a regular private repo.
Using these steps as a workaround:
# region workaround for madrapps/jacoco-report
# from https://github.com/marketplace/actions/delete-pr-review-comments
- uses: aki77/delete-pr-comments-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
bodyContains: |-
[Coverage(%)]
# from https://github.com/mshick/add-pr-comment
- uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: |
| Area | Coverage(%) |
| ------------- | ------------- |
| **Overall** | ${{(steps.jacoco.outputs.coverage-overall)}} |
| **Changed Files** | ${{(steps.jacoco.outputs.coverage-changed-files)}} |
refresh-message-position: true
# endregion
Notice the message "prNumber: undefined" in the debug output. The PR is unknown because the workflow was triggered by a push. Change the workflow trigger to "pull_request" instead and it will work.
I am running this action at debug mode and the log seems like everything is ok. but the github actions bot doesn't appear to comment on my pr. I am using a forked repo and created a pr to the forked repo, is that the problem? I think github actions' permissions are set to max privileges.