feat(project): enhance fork handling for existing repos
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Description
This merge request adds functionality to handle cases where a user attempts to fork a project that already exists in their namespace. Instead of failing, the code now offers options to clone the existing repository or add it as a remote. It also improves error handling and user feedback during the forking process. The changes mainly affect the project forking logic, providing a more user-friendly experience when dealing with potential naming conflicts or existing repositories. Additionally, the code introduces a new function to list projects, which is used to search for existing projects when adding them as remotes.
Resolve #897 (closed)
How has this been tested?
Screenshots (if appropriate):
Original | Updated |
---|---|
![]() |
![]() |
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Eve Kolb