Currently implementation of codecov reports sometimes attaches the analysis to main branch instead of the triggering PR. The root cause of the issue is a bug in Github which does not always populate github.event.workflow_run.pull_requests[0]. When it is populated, the current implementation works. When it is missing, override_commit and override_pr params to codecov-action become unset.
Yeah, the other option is much simpler. I think having an ability to do this is good though. If we decide to use PR report we now have it. If we don't need it, filtering can be done using if: ${{ ... }
Currently implementation of codecov reports sometimes attaches the analysis to main branch instead of the triggering PR. The root cause of the issue is a bug in Github which does not always populate
github.event.workflow_run.pull_requests[0]
. When it is populated, the current implementation works. When it is missing,override_commit
andoverride_pr
params tocodecov-action
become unset.More information available at https://github.com/orgs/community/discussions/25220
The workaround is to store both commit SHA and PR number in the original workflow since those are available there.
Fixes #148