unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: 44906@debbugs.gnu.org, 49482@debbugs.gnu.org
Subject: [bug#49482] [PATCH 3/3] ci: Properly construct URLs.
Date: Thu, 15 Jul 2021 09:35:31 +0200	[thread overview]
Message-ID: <871r80do70.fsf@gnu.org> (raw)
In-Reply-To: <d576a732f6bca1a530116a8665f72c413f8b3c0f.1625819848.git.h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Fri, 9 Jul 2021 10:38:40 +0200")


Hello Hartmut,

Thanks for this patchset!

> +(define* (api-url base-url path #:rest query)
> +  "Build a proper API url, taking into account BASE_URL's trailing slashes."

s/BASE_URL/BASE-URL/

You could also indicate what is the expect format for query: '("name"
"value") lists.

> +        (((_ #f) . rest) (lp rest acc))
> +        (((name val) . rest)
> +         (lp rest (cons*
> +                   name "="
> +                   (if (string? val) (uri-encode val) (number->string val))

What about booleans? False is filtered above but true will throw an
exception.

> +    (resolve-uri-reference ref base)))
> +
> +

There's an extra new line here.

> +(define* (json-api-fetch base-url path #:rest query)
> +  (json-fetch (apply api-url base-url path query)))
> +
> +

Here also.

Otherwise, it looks nice :)

Thanks,

Mathieu




      reply	other threads:[~2021-07-15  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09  8:38 [bug#49482] [PATCH 1/3] substitute: Fix handling of short option "-h" Hartmut Goebel
2021-07-09  8:38 ` [bug#49483] [PATCH 2/3] substitutes: Properly construct URLs Hartmut Goebel
2021-07-09  8:38 ` [bug#49482] [PATCH 3/3] ci: " Hartmut Goebel
2021-07-15  7:35   ` Mathieu Othacehe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r80do70.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=44906@debbugs.gnu.org \
    --cc=49482@debbugs.gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).