Skip to content

Remove design git repos when deleting a project

Aakriti Gupta requested to merge ag-remove-design-repo into master

What does this MR do and why?

Related issue: #361356 (closed)

Remove design git repos when deleting a project

Avoid orphaning design git repos when projects are deleted

Screenshots or screen recordings

How to set up and validate locally

  1. Setup a project with a design repo, ensure the git repo exists
p = Project.first
p.design_repository
p.design_management_repository.create_if_not_exists
raw_repo = p.design_repository.raw_repository
raw_repo.exists? # should be true
  1. Destroy the project: Projects::DestroyService.new(p, User.first).execute # assuming User.first has remove_project permission
  2. Check if the repo still exists: raw_repo.exists? # should be false

MR acceptance checklist

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

Edited by Aakriti Gupta

Merge request reports

Loading