Codecov reporting coverage from someone else's PR rather than main repo's `main`

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.
I understand that the community boards are a free, best-effort tool. While we hope to have someone on the Codecov team resolve your problem quickly, this is not always possible.


As shown in the image below, the code report is for commit 8b4393d, but that’s not a commit to quacc/main! It’s from a branch main but someone else’s fork that is opened in a PR (see here). I don’t want the coverage report for quacc/main to reflect anything other than the coverage in, well, quacc/main.

Here is my yml file:


Please provide a link to the CI/CD run.

Codecov Output


Expected Results

Coverage report should only be for quacc/main

Actual Results

It’s for a PR.

Additional Information

Here is the commit that the report should have been for: Update .codecov.yml · Quantum-Accelerators/quacc@ad9bcb2 · GitHub

@arosen93 I’ll take a look into this. There was an old bug where this would happen, but I’m pretty sure we squashed it a year ago.

@arosen93 sorry for the delay, we are still actively working on this problem. It is quite a bit hairy, so I don’t have any resolution for you right now. This is a problematic workflow, and we’re hoping to fix it for our users.

This PR should help address the problem

@arosen93 I know this doesn’t really answer the question, but as the community boards are soon to be set to read-only, I wanted to follow-up here. We are still tracking the issue and working on making a fix. You can view the issue here.