Skip to content

[BUG] Some PR uploads from forked repo fail due to branch mismatch #127

@Nothing4You

Description

@Nothing4You

Describe the bug
Some matrix jobs in GHA fail uploading test results with the error "Token required because body and commit branch mismatch" while others in the same matrix are working fine.
Retrying the same jobs in GHA keeps failing.

To Reproduce
unknown

Expected behavior
A clear and concise description of what you expected to happen.

Regression
unknown

Screenshots
N/A

Product Area
test analytics

Versions

  • OS: ubuntu 24.04
  • Git Host: GitHub
  • CI/CD: GitHub Actions
  • Uploader: codecov/test-results-action@@v1.1.1

Commit and CI link
aio-libs/aiomysql@d0c25d8
https://github.com/aio-libs/aiomysql/actions/runs/17630465417/job/50096800491?pr=1028

Run codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
gpg: key 806BB28AED779869: "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg: Signature made Thu Aug 21 16:12:56 2025 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
==> Uploader SHASUM verified (b0edd0c4ab2659327b15d90440880bdc3ae94953434d9a07b2f5f06bebddb921  codecov)
==> Running version latest
eventName: pull_request
baseRef: aio-libs:main | headRef: Nothing4You:bump-pytest-version
eventName: pull_request
baseRef: aio-libs:main | headRef: Nothing4You:bump-pytest-version
==> Fork detected, tokenless uploading used
==> Running command '/home/runner/work/_actions/codecov/test-results-action/47f89e9acb64b76debcd5ea40642d25a4adced9f/dist/codecov do-upload'
/home/runner/work/_actions/codecov/test-results-action/47f89e9acb64b76debcd5ea40642d25a4adced9f/dist/codecov do-upload -Z -f ./junit.xml -F CI-GHA -F OS-Linux -F VM-ubuntu-latest -F Py-3.9.23 -F DB-mariadb-10.11 -F ubuntu-latest_3.9_mariadb-10.11 -B Nothing4You:bump-pytest-version -C d0c25d8e4dfb83eaecac9507b92d5bb230546a71 --report-type test_results
info - 2025-09-11 00:40:50,766 -- ci service found: github-actions
info - 2025-09-11 00:40:50,834 -- Found 1 test_results files to report
info - 2025-09-11 00:40:50,835 -- > /home/runner/work/aiomysql/aiomysql/junit.xml
info - 2025-09-11 00:40:51,170 -- Process Upload complete
error - 2025-09-11 00:40:51,170 -- Upload failed: {"message":"Token required because body and commit branch mismatch"}
Sentry is attempting to send 3 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
Error: Codecov: Failed to properly upload report: The process '/home/runner/work/_actions/codecov/test-results-action/47f89e9acb64b76debcd5ea40642d25a4adced9f/dist/codecov' failed with exit code 1

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions