[Concept,30/32] patman: Filter out AI co-developer tags from patches

Message ID 20260226200106.1727176-31-sjg@u-boot.org
State New
Headers
Series patman: Add multi-upstream support |

Commit Message

Simon Glass Feb. 26, 2026, 8 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Strip Co-developed-by and Co-Authored-By tags that use noreply@ email
addresses, since these indicate AI-generated contributions rather than
human co-developers. Human co-developer tags are preserved.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 tools/patman/patchstream.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 429bbfb3bac..27cd1980e38 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -23,6 +23,10 @@  from u_boot_pylib import gitutil
 RE_REMOVE = re.compile(r'^BUG=|^TEST=|^BRANCH=|^Review URL:'
                        r'|Reviewed-on:|Commit-\w*:')
 
+# AI co-developer tags to remove (noreply@ indicates non-human)
+RE_AI_TAG = re.compile(r'^(Co-developed-by|Co-Authored-By):.*noreply@',
+                       re.IGNORECASE)
+
 # Lines which are allowed after a TEST= line
 RE_ALLOWED_AFTER_TEST = re.compile('^Signed-off-by:')
 
@@ -445,7 +449,8 @@  class PatchStream:
             self.commit.subject = line
 
         # Detect the tags we want to remove, and skip blank lines
-        elif RE_REMOVE.match(line) and not commit_tag_match:
+        elif (RE_REMOVE.match(line) or RE_AI_TAG.match(line)
+              ) and not commit_tag_match:
             self.skip_blank = True
 
             # TEST= should be the last thing in the commit, so remove