google / mdbook-i18n-helpers

Translation support for mdbook. The plugins here give you a structured way to maintain a translated book.
Apache License 2.0
121 stars 25 forks source link

Fix flaky codecov reports #168

Closed kdarkhan closed 5 months ago

kdarkhan commented 5 months ago

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.

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

kdarkhan commented 5 months ago

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: ${{ ... }