From e4650bc3491e6fa2a6dde9c109f490174a9ebc03 Mon Sep 17 00:00:00 2001 From: Mirai SHINJO Date: Sat, 3 May 2025 21:37:38 -0400 Subject: [PATCH] scripts: ci: check_compliance: fix identity check for multiple DCOs The current implementation of the identity check fails if multiple DCO signoff lines are present and the first instance of the signoff line does not belong to the author of the commit. This patch proposes a solution that allows patches with multiple DCO signoff lines to pass the identity check, regardless of the order of the signoff lines. Signed-off-by: Mirai SHINJO --- scripts/ci/check_compliance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index 0b82bcce456..026273b8be0 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -1462,7 +1462,8 @@ class Identity(ComplianceTest): match_signoff = re.search(r"signed-off-by:\s(.*)", body, re.IGNORECASE) - detailed_match = re.search(r"signed-off-by:\s(.*) <(.*)>", body, + detailed_match = re.search(rf"signed-off-by:\s({re.escape(auth_name)}) <({re.escape(auth_email)})>", + body, re.IGNORECASE) failures = []