Skip coverage upload for merge queue runs
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>
This commit is contained in:
@@ -34,6 +34,14 @@ runs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Skip coverage upload for merge queue runs — coverage should be
|
||||
# uploaded for PRs and the default branch, making merge queue
|
||||
# uploads unnecessary.
|
||||
if [ "${{ github.event_name }}" = "merge_group" ]; then
|
||||
echo "::warning::Skipping coverage upload for merge queue. Configure your workflow to upload coverage for PRs and the default branch instead. To avoid spinning up a runner, add \"if: github.event_name != 'merge_group'\" to the upload job."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Skip coverage upload for fork PRs — the token won't have write
|
||||
# permissions to the base repository.
|
||||
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "" ] && \
|
||||
|
||||
Reference in New Issue
Block a user