diff --git a/.github/scripts/release_notes_by_component.py b/.github/scripts/release_notes_by_component.py
index e86964f5a3..a1cbd9e8f3 100644
--- a/.github/scripts/release_notes_by_component.py
+++ b/.github/scripts/release_notes_by_component.py
@@ -127,7 +127,8 @@ PATH_RULES = {
PR_LINE = re.compile(r"^\* (?P
.+?) by @(?P\S+) in https://github\.com/\S+/pull/(?P\d+)\s*$")
# Lines regroup() writes between the PRs, so a second run accepts them.
-SCAFFOLD = re.compile(r"^$|^### |^|^ $")
+SCAFFOLD = re.compile(r"^$|^### (%s)$|^Dependencies \(\d+ updates?\)
$|^ $"
+ % "|".join(re.escape(s) for s in SECTIONS))
# "fix(s3tables,s3vectors): ...", "s3 lifecycle: ...", "[Volume] ...", "Fix/admin ..."
CONVENTIONAL = re.compile(r"^(?P[a-z]+)\((?P[^)]*)\)!?$")
TYPE_ONLY = {"fix", "feat", "feature", "perf", "refactor", "chore", "style", "revert", "improvement"}
diff --git a/.github/scripts/test_release_notes_by_component.py b/.github/scripts/test_release_notes_by_component.py
index cb64d63273..3ebacf8595 100644
--- a/.github/scripts/test_release_notes_by_component.py
+++ b/.github/scripts/test_release_notes_by_component.py
@@ -160,6 +160,8 @@ class RegroupTest(unittest.TestCase):
body = NOTES.replace("## New Contributors", "* a hand-written note\n\n## New Contributors")
with self.assertRaises(ValueError):
rn.regroup(body, self.files)
+ with self.assertRaises(ValueError):
+ rn.regroup(NOTES.replace("## What's Changed\n", "## What's Changed\n### Known issue\n"), self.files)
def test_author_from_the_by_clause(self):
body = "## What's Changed\n* Bump a by @dependabot[bot] in docs by @alice in https://github.com/seaweedfs/seaweedfs/pull/7\n"