Fix undercoverage not existing in older branches

What does this MR do and why?

Describe in detail what your merge request does and why.

Fixes the issue described in https://gitlab.com/gitlab-org/gitlab/-/issues/346972#note_749898426

We deliberately reset to the MR source branch for comparison. However the undercoverage script, and gem might not be present for older MR source branches. So, as a transitionary measure we skip undercoverage if the script file is not present.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading