Merge queue commits are ephemeral — coverage was already uploaded
during the PR, and the push to the default branch will upload
results for the final landed commit. Log a warning and exit
successfully instead of wasting an API call.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fork PR tokens don't have write access to the base repo, so the
upload would fail with 403. Detect this early and exit with a
notice instead of a red CI step.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the upload returns 403, surface a clear message telling the
caller to set security-events:write on their job, with a link to
the README's permissions section.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wraps the PUT /repos/{owner}/{repo}/code-coverage/report API call,
handling gzip/base64 encoding, PR vs push event detection, SHA/ref
resolution, and PR number lookup automatically.
Supports both pull_request-triggered and push-only workflows.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>