You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit updates the `print_workflow_run_errors.py` script to format
its standard output using Markdown for improved readability when viewed
in Markdown-aware environments.
Changes include:
- Job and step headings are now formatted as Markdown headers (H1-H4).
- Workflow run and job URLs are presented as clickable Markdown links.
- Actual log content (both grep results and last N lines) is enclosed
in ```log ... ``` fenced code blocks.
- Horizontal rules (`---`) are used to better separate sections.
- Minor textual adjustments for clarity within the Markdown structure.
The stderr output remains plain text for informational messages.
print(f"Workflow run {run['id']} ({run.get('html_url', 'N/A')}) has conclusion '{run.get('conclusion')}', but no jobs matching pattern ('{args.job_pattern}') were found to have failed.")
300
300
sys.exit(0)
301
301
302
-
print(f"\n--- Failed Jobs (matching pattern '{args.job_pattern}') for Workflow Run ID: {run['id']} ({run.get('html_url', 'No URL')}) ---\n")
302
+
# Print summary of failed jobs to stderr
303
+
sys.stderr.write("\nSummary of failed jobs matching criteria:\n")
sys.stderr.write("\n") # Add a newline for separation before stdout details
307
+
308
+
print(f"\n# Detailed Logs for Failed Jobs (matching pattern '{args.job_pattern}') for Workflow Run ID: {run['id']} ([Run Link]({run.get('html_url', 'No URL')}))\n")
print(f"\n--- Skipping subsequent failed step: {step.get('name', 'Unnamed step')} (use --all-failed-steps to see all) ---")
355
+
print(f"\n--- Skipping subsequent failed step: {step.get('name', 'Unnamed step')} (use --all-failed-steps to see all) ---")# Keep this as plain text for now
336
356
break# Stop after the first failed step if not --all-failed-steps
337
357
338
358
step_name=step.get('name', 'Unnamed step')
339
-
print(f"\n--- Step: {step_name} ---")
359
+
print(f"\n#### Step: {step_name}")
340
360
341
361
# Crude log extraction:
342
362
# Regex to match group start, attempting to capture the step name robustly
0 commit comments