Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/governance-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,18 @@ jobs:
exemption_patterns = []
claude_md = pathlib.Path('.claude/CLAUDE.md')
if claude_md.exists():
# Locate the TypeScript-exemption section's heading line. The
# regex matches any markdown heading containing both
# "TypeScript" and "Exemption[s]" — accepts variants like
# "### TypeScript Exemptions (Approved)" and
# "### TypeScript / JavaScript Exemptions (Approved)" — and
# is anchored to a heading prefix so prose mentions of the
# phrase elsewhere in the file (e.g. "the TypeScript
# exemptions above") do NOT trigger table parsing.
ts_heading = re.compile(r'^#{1,4}\s+.*TypeScript.*[Ee]xemption')
in_table = False
for line in claude_md.read_text(encoding='utf-8').splitlines():
if re.search(r'TypeScript [Ee]xemptions', line):
if ts_heading.match(line):
in_table = True
continue
if in_table and line.startswith(('### ', '## ', '# ')):
Expand Down
Loading