Merge main into feat/scripts-doc-defaults

This commit is contained in:
dotCooCoo committed 2026-11-29 05:51:56 -08:00
commit 212090fd7a
2 files changed
+10 -3

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
name: SonarCloud
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
+9 -3
View File
@@ -110,7 +110,7 @@ def assert_caller_secrets(source, job_name, names):
for value, children in (*root.values(), *job.values()):
outside_map = "\n".join([value or "", *children])
# Scan all remaining text: quoted braces can appear before a secret reference.
if re.search(r"(?im)^\s*environment:|\bsecrets\b", outside_map):
if re.search(r"(?im)(?:^\s*environment:)|(?:\bsecrets\b)", outside_map):
raise ValueError("secret bindings belong only in the signer map")
@@ -600,10 +600,13 @@ def app_workflows():
return {path.name: path.read_text() for path in sorted((ROOT / ".github/workflows").glob("*.y*ml"))}
WORKFLOW_KEY = re.compile(r'''("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^\s'"#{}\[\],:&*!|>%@`?-][^:#,{}]*?|-[^\s:#][^:#,{}]*?)\s*:(?:\s+(.*))?$''')
WORKFLOW_KEY = re.compile(
r'''((?:"(?:[^"\\]|\\.)*"|'(?:[^']|'')*')[ \t]*|[^\s'"#{}\[\],:&*!|>%@`?-][^:#,{}]*|-[^\s:#][^:#,{}]*):(?:[ \t]+(.*))?$'''
)
def _workflow_key(text):
text = text.rstrip()
if text.startswith('"'):
return None if "\\" in text else text[1:-1]
if text.startswith("'"):
@@ -620,7 +623,10 @@ def _workflow_value(text):
if text.startswith("'"):
quoted = re.match(r"'((?:[^']|'')*)'\s*(?:#.*)?$", text)
return None if quoted is None else quoted.group(1).replace("''", "'")
return re.split(r"\s+#", text, maxsplit=1)[0].strip()
for idx, ch in enumerate(text):
if ch == "#" and idx > 0 and text[idx - 1].isspace():
return text[:idx].rstrip()
return text
def _strip_comment(text):