Update repo_health.yml

This commit is contained in:
2025-12-27 02:36:08 -06:00
parent ae0b4de246
commit 68cf0f0113

View File

@@ -641,30 +641,27 @@ jobs:
content_warnings+=("README.md missing expected brand keyword")
fi
export MISSING_REQUIRED="$(printf '%s
' "${missing_required[@]:-}")"
export MISSING_OPTIONAL="$(printf '%s
' "${missing_optional[@]:-}")"
export CONTENT_WARNINGS="$(printf '%s
' "${content_warnings[@]:-}")"
export MISSING_REQUIRED="$(printf '%s\\n' "${missing_required[@]:-}")"
export MISSING_OPTIONAL="$(printf '%s\\n' "${missing_optional[@]:-}")"
export CONTENT_WARNINGS="$(printf '%s\\n' "${content_warnings[@]:-}")"
report_json="$(python3 - <<'PY'
import json
import os
import json
import os
profile = os.environ.get('PROFILE_RAW') or 'all'
required_files = ["README.md","LICENSE","CHANGELOG.md","CONTRIBUTING.md","CODE_OF_CONDUCT.md","TODO.md","docs/docs-index.md"]
optional_files = ["SECURITY.md","GOVERNANCE.md",".editorconfig",".gitattributes",".gitignore"]
required_paths = [".github/workflows","scripts","docs","dev"]
profile = os.environ.get('PROFILE_RAW') or 'all'
required_files = ["README.md","LICENSE","CHANGELOG.md","CONTRIBUTING.md","CODE_OF_CONDUCT.md","TODO.md","docs/docs-index.md"]
optional_files = ["SECURITY.md","GOVERNANCE.md",".editorconfig",".gitattributes",".gitignore"]
required_paths = [".github/workflows","scripts","docs","dev"]
missing_required = os.environ.get('MISSING_REQUIRED','').split('
') if os.environ.get('MISSING_REQUIRED') else []
missing_optional = os.environ.get('MISSING_OPTIONAL','').split('
') if os.environ.get('MISSING_OPTIONAL') else []
content_warnings = os.environ.get('CONTENT_WARNINGS','').split('
') if os.environ.get('CONTENT_WARNINGS') else []
missing_required = os.environ.get('MISSING_REQUIRED','').split('
') if os.environ.get('MISSING_REQUIRED') else []
missing_optional = os.environ.get('MISSING_OPTIONAL','').split('
') if os.environ.get('MISSING_OPTIONAL') else []
content_warnings = os.environ.get('CONTENT_WARNINGS','').split('
') if os.environ.get('CONTENT_WARNINGS') else []
out = {
out = {
"profile": profile,
"checked": {
"required_files": required_files,
@@ -674,11 +671,11 @@ out = {
"missing_required": [x for x in missing_required if x],
"missing_optional": [x for x in missing_optional if x],
"content_warnings": [x for x in content_warnings if x],
}
}
print(json.dumps(out, indent=2))
PY
)"
print(json.dumps(out, indent=2))
PY
)"
{
echo "### Guardrails: repository health"