Open nicholas-codecov opened 2 months ago
My take on this as written, is this is likely less of a bug and more that we didn't account for various edge cases when we first built the feature. I would ask that can we please enumerate these edge cases in the ticket (perhaps as a bulleted list) so we can get a better perspective of the scale of the change. After that we can prioritize this work.
Currently the API only checks the list of PR's in a repo and if there is only one then we say it's the "first pull request". This really only works for a small set of cases and does not handle edge cases well.
For instance if a user has only been committing to their
main
branch for a while, and starts using pull requests we only show the "first PR" banner on the pages, even though we can do a comparison because we have the data.There are also other cases where a user has been using PRs over time, however they've opened a PR to a branch that does not have any data on it, and we will attempt a comparison there because we don't determine it to be a "first pr" however it is the first PR being merged into that branch, so we should treat it that way.