Skip to content

Fix 404s when clicking links in full code quality report

What does this MR do?

In the full code quality report (introduced by !21527 (merged) in %12.9), each violation found should have a link to the line of code where it was found. Clicking this link should bring the user to the line in the file at the commit that the pipeline ran on. The link to the file is based on pipeline.ref, but this MR changes it to be based on pipeline.commit, because pipeline.ref refers to the merge request rather than the commit when the pipeline is a merged result pipeline, which results in a broken link. pipeline.commit refers to the commit which is what we want in order to make a valid link.

This MR also adds specs to check that the links are correct in both the normal pipeline case and the merged result pipeline case.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #210351 (closed)

Edited by Daniel Cipoletti

Merge request reports