GET /templates/licenses/:key doesn't work anymore with 'apache-2.0' (at least)
Bug Report
Hello Team
Since this commit, the call to GET /templates/licenses/:key fails when there's a special character in the license key (apache-2.0 at least).
In the attempt of factorizing the code with the shared function do, introduced some time ago, the license key is now path escap'ed with PathEscape from the withPath option function.
A possible fix would be to allow in withPath option function to be able to specify whether the args must be path escap'ed or not. Licenses templates endpoint is one, maybe other endpoints were also impacted by this ?
Any other thought on how to fix this ?
Relevant Log Output
These are the logs of the error output:
INFO <generate/generator_license.go:53> license detected, configuration has 'license' key
DEBUG <pkg/logger.go:35> call to 'https://gitlab.com/api/v4/templates/licenses/apache-2%2E0?fullname=<fullname>&project=<project>'
ERROR <pkg/generate.go:33> download license: get license template 'apache-2.0': 404 Not Found
Additional Details
- GitLab Client Go Version:
1.36.0 - GitLab Instance Version: SaaS
- Go Version:
1.26 - License Tier:
Ultimate OSS
Edited by 🤖 GitLab Bot 🤖