all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>, 63378@debbugs.gnu.org
Cc: rekado@elephly.net
Subject: bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header.
Date: Wed, 10 May 2023 00:55:45 +0100	[thread overview]
Message-ID: <87jzxh6ovy.fsf@systemreboot.net> (raw)
In-Reply-To: <3e14e27ad26ce9dee230733c7e77935b5f43599d.1683570582.git.maxim.cournoyer@gmail.com>


Hi Maxim,

When a patch relates to no teams, I get the empty header output
"X-Debbugs-Cc: ". For such patches, it would be nicer to not add any
header instead of adding an empty header.

> +(define (team->members team)
> +  "Return the list of members in TEAM."
> +  (sort (team-members team)
> +        (lambda (m1 m2)
> +          (string<? (person-name m1) (person-name m2)))))
> +
> +(define (member->string member)
> +  "Return the 'email <name>' string representation of MEMBER."
> +  (format #false "~a <~a>" (person-name member) (person-email
> member)))

When person name contains a comma, it should be escaped by surrounding
in double quotes. Else, the comma would interfere with the
comma-separated list that we are constructing for
X-Debbugs-Cc. Admittedly, none of our current team members have commas
in their person names. But, some people like to have a name like
"LastName, FirstName". We should protect against that edge case in the
interest of futureproofing.

> +     (format #true "X-Debbugs-Cc: ~{~a~^,~}"
> +             (append-map (compose (cut map member->string <>)
> +                                  team->members
> +                                  find-team)
> +                         (patch->teams patch-file))))

A very nitpicky suggestion: Maybe, separate multiple persons by ", "
instead of just ",". ", " looks slightly better cosmetically. Likewise
in other places where this occurs.

Thanks for all the hard work! :-)

Regards,
Arun




  parent reply	other threads:[~2023-05-09 23:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 17:17 bug#63378: A single X-Debbugs-CC header must be used Maxim Cournoyer
2023-05-08 18:29 ` bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header Maxim Cournoyer
2023-05-09 13:33   ` bug#63378: A single X-Debbugs-CC header must be used Maxim Cournoyer
2023-05-09 23:43     ` Arun Isaac
2023-05-10  1:15       ` Maxim Cournoyer
2023-05-09 23:55   ` Arun Isaac [this message]
2023-05-10 16:15     ` bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header Maxim Cournoyer
2023-05-11 11:13       ` Arun Isaac
2023-05-11 13:18         ` Maxim Cournoyer
2023-05-11 23:59           ` Arun Isaac
2023-05-10  2:55 ` bug#63378: [PATCH v2] " Maxim Cournoyer

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

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

  git send-email \
    --in-reply-to=87jzxh6ovy.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=63378@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rekado@elephly.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.