Allow ProjectAlias name to specify full route, not name
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=264378) </details> <!--IssueSummary end--> ZD: https://gitlab.zendesk.com/agent/tickets/175725 From customer: We have looked into `project aliases` feature that was introduced in GitLab 12.1: https://docs.gitlab.com/ee/api/project_aliases.html. However, this feature does not work for us. It fails to address complicated conversions from our translation table. For example, `https://<gitlab-instance>/api/v4/project_aliases?project_id=someone/test-repo&name=test-repo` works fine. However, `https://<gitlab-instance>/api/v4/project_aliases?project_id=someone-group/someone-subgroup/test-repo-in-subgroup&name=someone-group/test-repo-in-subgroup` gives out an error: ``` { "message": { "name": [ "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'" ] } } ``` @patrickbajao @danielgruesso Right now it looks like in https://gitlab.com/gitlab-org/gitlab/blob/44f2c87d89b6625551f93c6e9216c10987d2ec2b/ee/app/models/project_alias.rb#L10-13 we don't allow slashes in the name. However, in https://gitlab.com/gitlab-org/gitlab/blob/59606cbc5bd93e4ab2ccc65c0883736a0ba9b711/ee/lib/ee/gitlab/repo_path.rb#L10-11 we pass in the full path. Is there a reason we don't allow for full paths to be specified in this name? Can we just drop this regex validation (and/or rename the field to `full_path`) since it's specified by the admins?
issue