-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify when no coverage files appear #2787
Comments
I think this is a feature request @codecovdesign |
My hunch is this is really straightforward, but is still a feature request. @adrian-codecov can you spend an hour on this and if it's easy knock it out. If not, we can kick it back into the queue. |
My thoughts is to leverage the diff_totals https://github.com/codecov/worker/blob/6cb0a30e90fcbfa64931d28ae51152306161bade/services/notification/notifiers/mixins/message/writers.py#L31-L32 and seeing if it has any file -> did an experiment with a PR just with a readme change, with a coverable file, and a readme + a coverable file, and only the readme change came with 0 files in it. This should be a reasonable assumption that those files didn't lead to coverage. Adding that logic unexpectedly broke many tests, I think because those aren't correctly mocking the diff_totals/apply_diff functionality. Notifications tend to be spaghetti code/difficult to deal with, so this could maybe like ~1-2 days to figure out those tests. Probably for the better but a little more time expensive than anticipated. Please let me know how I should go about this and I'll get it going 👌 |
sync with @eliatcodecov
|
From bug sync: this ended up being non-trivial, so it may need to be a larger feature request @codecovdesign to follow up with @adrian-codecov to better capture the complexity on this ticket. Once captured we can try to slot this in as more of a feature request to be tackled as a larger scope of work. |
*marking as bug to discuss whether bug for fr in sync
Problem to solve
The Codecov report appears in the PR comment even when there are no coverable files – this causes some user confusion as reported recently. (scenario when yaml or JSON file appears)
Solution
IF no coverable files are changed, the report can appear as:
The text was updated successfully, but these errors were encountered: