Skip to content

Commit

Permalink
Fix issue with escaping of query string
Browse files Browse the repository at this point in the history
when url-build-query-string is used, the value of the q parameter must
be in a different format (+ must not used). Otherwise, the + is
escaped and gerrit is not able to perform the query.

Change-Id: I9ec07e0bed6e226e59f50918ed355340fb2fd9a3
  • Loading branch information
twmr committed Aug 1, 2022
1 parent 157a443 commit a8bc65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gerrit-rest.el
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ down the URL structure to send the request."
;; TODO query open topics
(interactive "sEnter a topic name: ")
(gerrit-rest-sync-v2 "GET" "/changes/"
:params `(("q" ,(concat "is:open+topic:" topicname))
:params `(("q" ,(concat "is:open AND topic:" topicname))
("o" "DOWNLOAD_COMMANDS")
("o" "CURRENT_REVISION")
("o" "CURRENT_COMMIT")
Expand All @@ -225,7 +225,7 @@ down the URL structure to send the request."
;; see https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
(let* ((limit-entries 25)
(resp (gerrit-rest-sync-v2 "GET" "/changes/"
:params `(("q" ,(concat "is:open+project:" project))
:params `(("q" ,(concat "is:open AND project:" project))
("o" "CURRENT_REVISION")
("o" "CURRENT_COMMIT")
("o" "DETAILED_LABELS")
Expand Down

0 comments on commit a8bc65d

Please sign in to comment.