]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not question obvious human Co-Authored-By trailers 12473/head
authorMichal Nowak <mnowak@isc.org>
Tue, 28 Jul 2026 14:57:47 +0000 (16:57 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 6 Aug 2026 09:40:04 +0000 (11:40 +0200)
Danger asks the reviewer to confirm that the person named in every
`Co-Authored-By` trailer is a human.  A trailer pointing at an
@isc.org address leaves no room for doubt, so stop emitting that
message for those and keep it for everything else.

Assisted-by: Claude:claude-opus-5[1m]
dangerfile.py

index 72ccab00aa62076fe43250e4914067e9f56ff241..4a5cfd0f97f37ad54aa16addfb2775f4478d5347 100644 (file)
@@ -182,6 +182,11 @@ LLM_SIGNED_OFF_BY_RE = re.compile(
     re.IGNORECASE | re.MULTILINE,
 )
 COAUTHORED_BY_RE = re.compile(r"^Co-Authored-By:.*$", re.IGNORECASE | re.MULTILINE)
+# A trailer pointing at an @isc.org address is a human co-author; there
+# is no point in asking for confirmation.
+HUMAN_COAUTHORED_BY_RE = re.compile(
+    r"^Co-Authored-By:\s+.*<[^<>@\s]+@isc\.org>$", re.IGNORECASE
+)
 # CONTRIBUTING.md documents the trailer format as
 # `Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]`.  Match every
 # `Assisted-by:` line, then check it against the expected shape.
@@ -242,6 +247,8 @@ for commit in danger.git.commits:
         )
     else:
         for coauthor_line in COAUTHORED_BY_RE.findall(commit.message):
+            if HUMAN_COAUTHORED_BY_RE.match(coauthor_line.strip()):
+                continue
             message(
                 f"Commit {commit.sha} contains a `Co-Authored-By` trailer: "
                 f"```{coauthor_line}```. Ensure the named co-author is a "