From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795898268; b=k3+Ta9USFAdBEkewR3SfS1ajKfRHGmMHu1wbtJZsUIfHSYzNWZHjKH1CUE/d6LpRl165 32DB0nsoplk8295WnEk8K6JVr5GI+6fach+zMnNROcrRUpZD/DRH3Zf7yDCT6zmVkoIqs U267INvFMZAhaB8McaAUJxsIF/+Ua2A2c4CnUpwxgRtOE2pvyGxT2Kxu2iFhW8eT2y/qE kxMLsk73RFe0IN3RmzzfoBG6XC1aBp1nwXTqycvQtNHuCxaz6XvOG/eTeCZRAxBCham+O mnXV1Exxjt5oVdHWVGjBTJvk1w3r7K0NyyrIjJIdBaEFFjvgW/1b3XLrngOwBztdL/g== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795898268; h=Received:Delivered-To:Received:DMARC-Filter:Received:DKIM-Signature: Received:Received:Received:From:To:CC:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding:X-FB-Internal: Content-Type:X-Proofpoint-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-Virus-Version; bh=mlAVCFOuC8VqnC2oUSa4gNsMaupqSi6AV1n8PHNS9II=; b=zPT2H8kZYo7SUJYcoeLRZ3YseQJC8aO7+RkcEdHb01IOdL26uBLkrbj9XsnEGLcIL3SW NB9RDvfEeuuPpfzQil8k1w05bVvMfyTCKwYzYdoIBXNKVDfyRtHKwU3sbZ2bhuHcTDoRk eEvM1xdotcS/4ied4bneVmGOiJfpN6ECttmB28+94nG1fRzLadEcaW4X8kwfdOY8cyprs bYsHVvC88t7bcoiUVAw9FCkulqXY5VwWcDpqmkglEIg+rIiepeIN12vOcJf9JczeVfYUn OP7oqXMA8vm+77FWgWLypxj2zn46ysSN5kZiGas3iLdfRAsVRI2kUZ1l5cYioElg7BQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=meta.com header.i=@meta.com header.a=rsa-sha256 header.s=pps82601-s2048-2026-q3 header.b=c78NFGG4; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20E22606A31C for ; Sat, 28 Nov 2026 20:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=meta.com header.i=@meta.com header.a=rsa-sha256 header.s=pps82601-s2048-2026-q3 header.b=c78NFGG4 Received: by smtp.kernel.org (Postfix) id B1D051F000C1; Sat, 28 Nov 2026 20:37:47 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=67.231.153.30 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795898267; b=0qKpUPeQB3k/Poj0u87LeXH/JP/6RCRq5uiEnDthBliFqkc5hpU9Hkspk/fZfQZPQGy9 0fy6q9Sh2NsXoJTVet9Bb1xRFQM734px+R7AkzfvBezlAM+dRKAOthizbZxlf349A2PM0 u7mVaPnwldw0Pjs5Az3kB16HKnV1vAVo9eawGH0x8PAdoq7uEO4LxfoJ+VwV/48xHzuCg TxWua+6vee/K2nFJYalvEHfQq6FKggAaOtsRwMZ9A2Jr5tWFEIAbIh9MmDlSUiK5CEQ8P rgX2y4s7lmkylsQrAqRvzl16dNt/ZaZPtbdRURW2Emn6XeWi2HUyu3HplczR1OyIqtA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795898267; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:From: To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-FB-Internal:Content-Type: X-Proofpoint-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-Virus-Version; bh=mlAVCFOuC8VqnC2oUSa4gNsMaupqSi6AV1n8PHNS9II=; b=RvE0DlFV8CIdr/zPHmow8Jc9XUJbla59wviB3JD0I896jO1mFJ96ZK8pyUpULDsCL5+d EjxPoVcxzNoPdXdkQ1h8iQdFnJnxxepZrSrCELKvdHrJgdz9NCYuH5NhSDReZ118uvpO8 qMcMthiWmb6iEm/xqg7CkVEZ7WjZePw4vsy659gwasT9V2cUon1DvzWx5Mlf34l6S69sc EQAcPAE2wBiBHRXuz9caRMgbT95g3vHryQnvxLldQT8fdPhDVQZvIl2vHXS2z+2OGPHST P9YM3OHC2RXrGpjnMhmbubHRtaczV8VoFEYbFTxqH4ulO9pHHaSE1aIjpYUVBPo+hsw== ARC-Authentication-Results: i=1; smtp.kernel.org; dkim=pass header.d=meta.com header.i=@meta.com header.a=rsa-sha256 header.s=pps82601-s2048-2026-q3 header.b=c78NFGG4; dmarc=pass header.from=meta.com; spf=pass smtp.mailfrom=meta.com; arc=none smtp.remote-ip=67.231.153.30 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id EE5061F00893 for ; Sat, 28 Nov 2026 20:37:46 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.a=rsa-sha256 header.s=pps82601-s2048-2026-q3 header.b=c78NFGG4 DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.kernel.org EE5061F00893 Authentication-Results: smtp.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=meta.com Received: from pps.filterd (m0528004.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6ASKaLm8084490 for ; Sat, 28 Nov 2026 12:37:46 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pps82601-s2048-2026-q3; bh=mlAVCFOuC 8VqnC2oUSa4gNsMaupqSi6AV1n8PHNS9II=; b=c78NFGG49RNkNj5pATNYU5xe4 jNzcLLgtvEy9h03ipMyXdw/FjtBZ6gEyaxXRfYD14pEqW7P5RbxBilsHCJ8eeWlm i5zZFhKux/87Z2c2ehMusIjWyy9pNicXIZQR9s2uq86uJqEutU9guhFXsJEUu8ny nu/GmgULdcyelJB8lFC99YI4peAzUM/bWrQaHhb4Kxpdz2vZw1848GMsuh23zayD MufuQyVGKMFJkhdPfJiwycUL/NZFedmYgyZV7M+WRMWMArk/VZ9fDSe9zqt8AWq9 i5LG9ZHS5wJXrkBQNp7CZbf8eOW1rvcX2Z7bkM4cCeBAMjO27WR8oujO2oCjA== Received: from mail.thefacebook.com ([163.114.134.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 4j7cb0d2pj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 28 Nov 2026 12:37:45 -0800 (PST) Received: from twshared9449.02.snb2.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c08b:78::2ac9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.56; Sat, 28 Nov 2026 20:37:44 +0000 Received: by devbig197.nha3.facebook.com (Postfix, from userid 544533) id DE9FA2FB5DA7D; Sat, 28 Nov 2026 12:37:24 -0800 (PST) From: Keith Busch To: , CC: Keith Busch Subject: [PATCH] ty: say in the body when only part of a series was applied Date: Sat, 28 Nov 2026 12:37:18 -0800 Message-ID: <20261128203718.662862-1-kbusch@meta.com> X-Mailer: git-send-email 2.52.1 X-Mailing-List: tools@linux.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: edyjgNZtE36bWLBU1kB00Yj0r6y9Knl- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTI4MDA4MiBTYWx0ZWRfX1V8usxOA+vfu 6nLsGxwtI7n2kaf/fjycb/z//HGfNeLqPsAmcNcUwT0mg54g+RH7KeyJnniyviGm3xpvufDHZjW D1sVq8xzNygxDX/itee/4tsJr0PHunIQ5ekPTPlrDlUNvGSTVaJPcZbNZSyrzCBYTfK/I1mBTZ9 6ruyUDhtURicKm2cX4jQKP8NXSU9oEM/o7hGOtmfIZaDIT7lJ5wY+flFTha3eQekkj4BvfL30vH aGrTyCMEOJ0u9kZ1mbTs6el4Lr6wME2yXUkuiO2mKkaVK/FfCM+aedFSfXwwtO1s5cKREYgEvhJ 3tCEQHvNpJmoWPrDNLswrBOt+PSDCRQKqA2mZPP1im+NqfY5mQO14alxG9rAW9gZDPlJkEBIwE0 kmIV1uxf8/zZuj/5ki1ZRaRvwZlhoU4beM/YD9CPcFN/YB3N8jm2zqd7J+ajmnVkC9IXruDcsGT TmJI5bvqNwG/gOWcepg== X-Proofpoint-ORIG-GUID: edyjgNZtE36bWLBU1kB00Yj0r6y9Knl- X-Authority-Analysis: v=2.4 cv=As97T+9P c=1 sm=1 tr=0 ts=6b0b3b99 cx=c_pps a=CB4LiSf2rd0gKozIdrpkBw==:117 a=CB4LiSf2rd0gKozIdrpkBw==:17 a=cr1b-MDc-xk6eEmq:21 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=7x6HtfJdh03M6CCDgxCd:22 a=GbPsI2Ihf5RTnMjR_gZv:22 a=VwQbUJbxAAAA:8 a=NEAV23lmAAAA:8 a=p0WdMEafAAAA:8 a=A1X0JdhQAAAA:8 a=eDHfoY4QsHuCD_1gXYwA:9 a=r-HJ9bD__24A:10 a=k4-JPVog8Rr2I6981Fvu:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMTI4MDA4MiBTYWx0ZWRfXwitcgGOt3MGK EBudF1satHFV+S690e9RFegeQ1yYwxBMlhPBXfEMkUN2qnu8US5H5Ud1WriIMhbiW1BJW3ZcExk 6iy7OJR4mKP8+Un/u+sr+TxvFgnFndY= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-28_04,2026-11-27_03,2025-10-01_01 From: Keith Busch A partial pickup only marks its thank-you with "(subset)" in the subject. Threaded mail views often show just the first subject of a thread, so the contributor can miss that the other patches were not taken. Add a ${subset} template variable that holds a line saying so for a partial pickup and is empty otherwise, and use it in the default and example templates. Signed-off-by: Keith Busch --- src/b4/templates/thanks-am-template.example | 4 +++- src/b4/ty.py | 5 ++++- src/tests/test_ty.py | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/b4/templates/thanks-am-template.example b/src/b4/templat= es/thanks-am-template.example index b38131b..dd65949 100644 --- a/src/b4/templates/thanks-am-template.example +++ b/src/b4/templates/thanks-am-template.example @@ -23,7 +23,9 @@ ${quote} # b4-check-repo =3D https://git.kernel.org/pub/scm/linux/kernel/git/un= ame/sound.git # b4-commit-url-mask =3D https://git.kernel.org/uname/sound/c/%.8s Applied to ${branch}, thanks! - +# When only some patches of a series were applied, ${subset} adds a line +# saying so; otherwise it is empty. Keep it on a line of its own. +${subset} # for patch series, the summary is a list of each patch with a link # to the commit id in your tree. b4 builds these links itself for trees # on git.kernel.org, github.com and gitlab.com; for other hosts, set diff --git a/src/b4/ty.py b/src/b4/ty.py index 85de47d..9fa15f6 100644 --- a/src/b4/ty.py +++ b/src/b4/ty.py @@ -48,7 +48,7 @@ On ${sentdate}, ${fromname} wrote: ${quote} =20 Applied, thanks! - +${subset} ${summary} =20 Best regards, @@ -136,8 +136,11 @@ def make_reply( subject =3D re.sub(r'^Re:\s+', '', jsondata['subject'], flags=3Dre.I= ) if jsondata.get('cherrypick'): msg.add_header('Subject', 'Re: (subset) ' + subject) + # Threaded views often show only the first subject, so say it in= the body too + jsondata['subset'] =3D 'Partial patchset pickup: only the patche= s listed below were applied.\n' else: msg.add_header('Subject', 'Re: ' + subject) + jsondata['subset'] =3D '' =20 msg['Message-Id'] =3D b4.make_msgid(idstring=3D'b4-ty', allow_custom= _msgid_cmd=3DTrue) msg['Date'] =3D email.utils.formatdate(localtime=3DTrue) diff --git a/src/tests/test_ty.py b/src/tests/test_ty.py index f429cb1..d897af9 100644 --- a/src/tests/test_ty.py +++ b/src/tests/test_ty.py @@ -837,6 +837,22 @@ def test_make_reply_me_too_never_keeps_us_as_address= ee() -> None: assert tos =3D=3D ['list@example.com', 'Test@example.com'] =20 =20 +@pytest.mark.parametrize('cherrypick', [True, False]) +def test_make_reply_subset(cherrypick: bool) -> None: + """A partial pickup says so in the body, not only in the subject.""" + jsondata =3D _am_jsondata('0123456789abcdef0123456789abcdef01234567'= ) + jsondata['cherrypick'] =3D cherrypick + cmdargs =3D mock.Mock(metoo=3DFalse, since=3DNone) + msg =3D b4.ty.make_reply('Applied!\n${subset}\n', jsondata, None, cm= dargs) + body =3D msg.get_payload(decode=3DTrue).decode() + if cherrypick: + assert msg['Subject'] =3D=3D 'Re: (subset) [PATCH] frobnicate' + assert body =3D=3D 'Applied!\nPartial patchset pickup: only the = patches listed below were applied.\n\n' + else: + assert msg['Subject'] =3D=3D 'Re: [PATCH] frobnicate' + assert body =3D=3D 'Applied!\n\n' + + def test_queue_message_check_headers( monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path ) -> None: --=20 2.52.1