From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eH1+IuDdWmR0zAAASxT56A (envelope-from ) for ; Wed, 10 May 2023 01:57:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qPJ+IuDdWmTM1gAA9RJhRA (envelope-from ) for ; Wed, 10 May 2023 01:57:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3F04A38F8C for ; Wed, 10 May 2023 01:57:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwXCa-00007P-Hy; Tue, 09 May 2023 19:57:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwXCY-00007B-Pp for bug-guix@gnu.org; Tue, 09 May 2023 19:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwXCY-0006Z8-Ew for bug-guix@gnu.org; Tue, 09 May 2023 19:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwXCY-0004Km-Ax for bug-guix@gnu.org; Tue, 09 May 2023 19:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63378: [PATCH] teams: Fix script to produce a single X-Debbugs-Cc header. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 09 May 2023 23:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63378 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer , 63378@debbugs.gnu.org Cc: rekado@elephly.net Received: via spool by 63378-submit@debbugs.gnu.org id=B63378.168367656816595 (code B ref 63378); Tue, 09 May 2023 23:57:02 +0000 Received: (at 63378) by debbugs.gnu.org; 9 May 2023 23:56:08 +0000 Received: from localhost ([127.0.0.1]:44752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwXBg-0004Ja-06 for submit@debbugs.gnu.org; Tue, 09 May 2023 19:56:08 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:45608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwXBd-0004JP-0C for 63378@debbugs.gnu.org; Tue, 09 May 2023 19:56:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rD26R280Qst1C7wILQcOXDFLUS/AyC3LTMp6Ioi9yes=; b=NLKb/fuY+lhp95Y3zFB/jt6cCd V6r0lFhyxqjaK9VWQVWXce68yXzo9az48FTm7NmOSzYR7T2HJchz1JEq3YbWvP1gHh+OMOcTavoNe 4oJQgD5qGif5uryFGyYEEUMPDiGKGTgoSRyTebBcp+/zwUBFDU2sOJQJRrof/4G1XviZ4X+HG6fCx GqhSuJOrZWgoAGD34mHVMLgSawtg7sbXWvyDguqR0uzGFP25JLHRa3PIvECIK/mWnPdDxSqZEW4H/ bx48Tjyh9BhJ7Swp6v5FaziDmo3atbZGrbkb+3aUKjQVwjxEtVEKH7aX4wy5si/5BqmaaOICcspg+ juv5JGLg==; Received: from [192.168.2.1] (port=38542 helo=localhost) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pwXBV-000KH3-2Z; Wed, 10 May 2023 00:55:58 +0100 From: Arun Isaac In-Reply-To: <3e14e27ad26ce9dee230733c7e77935b5f43599d.1683570582.git.maxim.cournoyer@gmail.com> References: <875y92vj2j.fsf@gmail.com> <3e14e27ad26ce9dee230733c7e77935b5f43599d.1683570582.git.maxim.cournoyer@gmail.com> Date: Wed, 10 May 2023 00:55:45 +0100 Message-ID: <87jzxh6ovy.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683676640; a=rsa-sha256; cv=none; b=YFCYCx2eEwzX1C3WNYarTZFRNPBRHrv5M5+H6PIQVnPQIwp2U34QleX5AxjWxu9RlWZdk8 4dB7Vv8tz/Xz0Bdhe2AXwPLVvgUMkFDL/aXSiLR2GmOkTnSyXGbq5Tnhy7kSeHuLdcoUJ9 0xkc9XOKGtQ8H/hGMnCln0mYoo/iQRko9tlGks7D5V5klZbRnQy7bHSsxE80sqEO4Tmd3a 6jwNJwQ66sM7XooAWBVpIvQ+r4tzprEUY1v0+wTy+ugCsWCGZPNORR2Jh99mAI9lJ9ha1B CwypbreUXorD45OCI/AeuIK8RHu/80JXA9EeaehP7OK22zcmqS1YBHBPLHbTsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b="NLKb/fuY"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683676640; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=rD26R280Qst1C7wILQcOXDFLUS/AyC3LTMp6Ioi9yes=; b=Yh4UagcdRfglvDuOB3qkZP4ltYKiuKwcVl3K68rqhy2mtMDDtWLeuqlYCS2iYlI6l1gFvS fUg9Ev80mQpwxmsRh07J/0p8MizuawJrmcJ7iLiUKKbtymAJjrzTD0ICw+0n9KoRuUV8sA IPnn/mGIC0r4MUqgZ/aAaeldUJDAlg9Exo7MmBySTHqGwFV4H9Ex/tx56yYuPbotFJZCSy uCPijJfsYlDDv9DsRyyAI3VuXqm3VQrupRu6fSRAS3yM06ApmX/Inyudk4HrwIxuFFc/Mt oyzmIsuQqjh6xNPgJ5akF/06pvPb0Sin4BzOF5ntD017k1qOgnVt7LgXWFybNA== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b="NLKb/fuY"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.82 X-Spam-Score: 5.82 X-Migadu-Queue-Id: 3F04A38F8C X-TUID: Y1i2x7zQxyhD 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 + > +(define (member->string member) > + "Return the 'email ' 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