Skip to content

Push Rules API 404 when dot in the namespace

Vasilii Iakliushin requested to merge 433469_fix_dot_in_namespace into master

What does this MR do and why?

Contributes to #433469 (closed)

Problem

When user directly provides a path to the project or group and the path contains a . symbol. Then the user receives a 404 response even if the push rule exists.

Solution

Add missing requirements for resouces definition.

How to set up and validate locally

  1. Create a project with a . in the name. For example, project.path
  2. Visit push API link (similar to http://127.0.0.1:3000/api/v4/projects/root%2Fproject.path/push_rule)
  3. You should see null if the push rule is not set
  4. Without a fix, you will see a 404 error.

Screenshot_2023-12-13_at_18.05.17

MR acceptance checklist

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

Merge request reports