go-gerrit icon indicating copy to clipboard operation
go-gerrit copied to clipboard

labels should not be pre-escaped

Open flokli opened this issue 4 years ago • 3 comments

Gerrit syntax allows to query for approval scores, so something like the following is possible:

status:open label:verified=+1,user=jenkins

For all open changesets that were +1'd by a user named jenkins.

Due to https://github.com/andygrunwald/go-gerrit/commit/8adc2df24e0bb558be35851e39414a0114f6e6ff, it however currently is impossible construct such a query - the + inside label:verified=+1 gets escaped wrongly.

flokli avatar Sep 10 '19 21:09 flokli

Thank you for the report. Would you be able to construct a failing unit test for this?

@opalmer Any thoughts on this?

andygrunwald avatar Sep 23 '19 19:09 andygrunwald

Hmm, the escaping that's being done now is probably correct either in older version or when there are multiple queries separated with ,. I don't have access to a recent version of Gerrit to test with so if there's a way to construct a failing test case that could be used to test a fix against that would help.

opalmer avatar Sep 24 '19 14:09 opalmer

@opalmer what about review.coreboot.org? It's on the latest gerrit version, and I can query the following: label:Verified=+1,user=jenkins status:open

Link: https://review.coreboot.org/q/label:Verified%253D%252B1%252Cuser%253Djenkins+status:open

flokli avatar Sep 24 '19 15:09 flokli