Skip to content

Fix path generation for sub-groups in single-file file-by-file

Thomas Randolph requested to merge tor/defect/diff-for-path-namespace into master

What does this MR do and why?

When a file is in a sub-group, project.namespace.path returns an invalid path for the file.

This fix updates to use project.namespace.to_param, which returns the correct path.

Screenshots or screen recordings

n/a

How to set up and validate locally

  1. Enable Feature.enable(:single_file_file_by_file)
  2. Create a group
  3. Create a sub-group in that group
  4. Create a project in the sub-group
  5. Create an MR with at least 1 file of changes
  6. Change the view mode to "View changes one file at a time" and refresh the page

MR acceptance checklist

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

Related to #407332 (closed)

Edited by Thomas Randolph

Merge request reports