Code quality report compares with latest pipeline

Summary

The CodeQuality / Codeclimate MR widget searches in the last pipeline that ran for the target branch, regardless if the job ran in that pipeline or not.

Steps to reproduce

  1. Create a repo with code quality in MRs enabled
  2. Create a schedule to run on main branch (e.g. deploy artifacts to some service daily)
  3. Create a MR
  4. After the schedule ran once, the widget cannot find the base branch codequality report any longer

What is the current bug behavior?

The MR scans the latest run pipeline for the target branch.

What is the expected correct behavior?

The MR should find the latest pipeline in which the job ran?

Alternatively is there a better workflow if a project uses scheduled pipelines that run once a day? Run the codequality job in the schedule?