Skip to content

Default to generating blob links for missing paths

Nick Thomas requested to merge 25995-default-relative-links-to-blobs into master

What does this MR do?

Given markdown like:

[A file in the repository](/missing.file)

If the file is present in the repository, we currently generate a link to /my/project/-/blob/master/missing.file. If it is not in the repository, we generate a link to /my/project/-/master/missing.file instead.

This link doesn't go anywhere, and will be a 404. If we default it to blob instead, the generated URL makes a lot more sense, even if it's still a 404.

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 #25995 (closed)

Edited by Nick Thomas

Merge request reports