branch: main
commit 07197c029f01955c5ca1070923caaf7066162d49
Author: Romain GARBAGE <[email protected]>
AuthorDate: Wed May 7 15:50:44 2025 +0200

    forgejo: Fix invalid JSON body in review creation API.
    
    * src/cuirass/forges/forgejo.scm (forgejo-api-pull-request-create-review):
    Remove extra scm->json-string conversion as it is already done by 
FORGEJO-REQUEST.
    Fix typo in docstring.
    
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 src/cuirass/forges/forgejo.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/cuirass/forges/forgejo.scm b/src/cuirass/forges/forgejo.scm
index 2e451ed..043cf07 100644
--- a/src/cuirass/forges/forgejo.scm
+++ b/src/cuirass/forges/forgejo.scm
@@ -313,7 +313,7 @@ JSON. Returns the content of the updated pull-request."
   "Creates a pull request review for the pull request identified by
 PULL-REQUEST-INDEX containing the message REVIEW-MESSAGE, a string, and the
 status REVIEW-STATUS, a symbol that can be either 'COMMENT, 'APPROVED or
-'REQUEST-CHANGES. Returns the review ID, a number."
+'REQUEST_CHANGES. Returns the review ID, a number."
   (unless (forgejo-valid-review-state? review-state)
     (raise
      (condition
@@ -321,10 +321,10 @@ status REVIEW-STATUS, a symbol that can be either 
'COMMENT, 'APPROVED or
        (message (format #f
                         "forgejo-api-pull-request-create-review: ~a is not a 
valid review state"
                         review-state))))))
-  (let* ((body (scm->json-string `((body . ,review-message)
-                                   (comments . ())
-                                   (commit_id . "")
-                                   (event . ,review-state))))
+  (let* ((body `((body . ,review-message)
+                 (comments . ())
+                 (commit_id . "")
+                 (event . ,review-state)))
          (response (forgejo-request server
                                     (api-build-endpoint
                                      (format #f "/repos/~a/~a/pulls/~a/reviews"

Reply via email to