Skip to content

Commit c6e029f

Browse files
committed
Fix YAML syntax error in nightly workflow
- Use heredoc for multiline Python script to avoid YAML parsing issues - Remove escaped quotes that were causing syntax errors Signed-off-by: Dan Gil <[email protected]>
1 parent c45deaa commit c6e029f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/dependency-extraction-nightly.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,25 @@ jobs:
8080
removed_count=$(python3 -c "import json; print(json.load(open('.github/reports/removed_dependencies.json'))['count'])" 2>/dev/null || echo "0")
8181
8282
# Format removed dependencies list for PR body (limit to first 10)
83-
removed_list=$(python3 -c "
83+
removed_list=$(python3 << 'PYTHON_SCRIPT'
8484
import json
8585
try:
8686
data = json.load(open('.github/reports/removed_dependencies.json'))
87-
removed = data['removed'][:10] # First 10
87+
removed = data['removed'][:10]
8888
lines = []
8989
for dep in removed:
9090
critical = ' **[CRITICAL]**' if dep.get('Critical') == 'Yes' else ''
91-
lines.append(f\" • **{dep['Dependency Name']}** (was: \`{dep['Version']}\`){critical}\")
92-
lines.append(f\" _from {dep['Source File']}_\")
91+
lines.append(f" • **{dep['Dependency Name']}** (was: `{dep['Version']}`){critical}")
92+
lines.append(f" _from {dep['Source File']}_")
9393

9494
if data['count'] > 10:
95-
lines.append(f\" _... and {data['count'] - 10} more (see CSV for full list)_\")
95+
lines.append(f" _... and {data['count'] - 10} more (see CSV for full list)_")
9696

9797
print('\n'.join(lines))
9898
except:
9999
print(' _No removed dependencies_')
100-
" 2>/dev/null || echo " _Unable to parse removed dependencies_")
100+
PYTHON_SCRIPT
101+
)
101102
else
102103
removed_count="0"
103104
removed_list=" _No removed dependencies_"

0 commit comments

Comments
 (0)