github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Updating a label with a question mark results in an error

Open gsmet opened this issue 1 year ago • 0 comments

Describe the bug

In the Quarkus project, we used to have labels like triage/backport? (i.e. something that should be considered for backport but is not certain to be backported).

When working on some automation, I stumbled upon the fact that updating the label name via the API was not possible as the ? is not correctly escaped in the URI, thus the label not being found when fetched.

repository.getLabel("triage/backport?").update().name("triage/backport-3.6?").done();

would fail.

I wanted to log the problem so that we don't forget about it. I renamed our labels for the time being.

I'll try to contribute a fix soon but feel free to beat me to it :).

gsmet avatar Jan 18 '24 17:01 gsmet