Subject: Re: [PATCH Cuirass 2/4] forgejo: Add module for Forgejo JSON objects definition.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 12 Dec 2024 14:34:10 +0100

Hi!

Very nice! :-)

Romain GARBAGE <[email-masked]> skribis:

> * Makefile.am: Add src/cuirass/forgejo.scm and tests/forgejo.scm.
> * src/cuirass/forgejo.scm: Add <forgejo-repository>,
> <forgejo-pull-request-event>, <forgejo-pull-request>,
> <forgejo-repository-reference> and <forgejo-repo> record types.
> (forgejo-pull-request->specification): New variable.
> * tests/forgejo.scm: Add tests.
>
> fixup tests

Leftover?

One thing, though:

> +(define* (forgejo-pull-request->specification pull-request #:optional (cuirass-options #f))
> +  "Returns a SPECIFICATION built out of a FORGEJO-PULL-REQUEST."
> +  (let* ((source-repo-reference (forgejo-pull-request-head pull-request))
> +         (project-name (forgejo-repository-name
> +                        (forgejo-repository-reference-repository
> +                         (forgejo-pull-request-base pull-request))))
> +         (source-branch (forgejo-repository-reference-ref source-repo-reference))
> +         (source-url (forgejo-repository-url
> +                      (forgejo-repository-reference-repository source-repo-reference)))
> +         (id (forgejo-pull-request-number pull-request))
> +         (name-prefix (if (and cuirass-options
> +                               (jobset-options-name-prefix cuirass-options))
> +                          (jobset-options-name-prefix cuirass-options)

The ‘jobset-options-*’ variables are unbound.  I understand the goal is
to share <jobset-options> as defined in (cuirass gitlab), but perhaps
that should either be made clearly, or just left out for now.

Thanks!

Ludo’.