Skip to content

Update projects.rb to make API and UI handle project names consistently

username-removed-825347 requested to merge (removed):master into master

What does this MR do?

This makes the UI and API handle project names consistently. Right now, you can create projects with dots in the name, but the API treats the '.' as a separator, so if you search for 'foo.bar', the query is just 'foo' https://gitlab.com/gitlab-org/gitlab-ce/issues/25558

Are there points in the code the reviewer needs to double check?

This is the only place in the 'query' is used, so it probably makes sense to just add the requirement (constraint) on that line. But this requirement could potentially be done at the top of the file where the requirement for 'id' is done?

Why was this MR needed?

User can create a project with dots (apparently pretty common with Python) but then can't search for them through the API

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/25558

Merge request reports