gitlab: add project path function to map special chars
Automatic path conversion is limited to GitLab API v4 and will be
removed in the future. It's expected that the caller does the path
conversion on caller side and only passes a valid path to the API within
its limitations.
Hence convert project names to valid paths:
1. replace single '+' between word boundaries with '-'
2. replace any other '+' with literal 'plus'
3. replace any special chars other than '_', '-' and '.' with '-'
4. replace consecutive '_-' chars with a single '-'
5. replace 'tree' with 'unix-tree' due to GitLab reserved keyword
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
0 files changed, 0 insertions, 0 deletions