Only rename namespaces and projects with an invalid path
In staging we were renaming a namespace that shouldn't be renamed because its path ended in a -
, which is an illegal path.
We were querying for routes like this: %#{path}
, but we should try to match the entire path of a name, so the route would be like %/#{path}
or #{path}
.
This is needed to fix this migration error in RC1: https://gitlab.com/gitlab-org/gitlab-ce/issues/31934#note_29424556