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
Copy file name to clipboardExpand all lines: .claude/commands/summarize_ci.md
+74-36Lines changed: 74 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,10 @@ Steps:
11
11
-**If no failed runs found:** Check if tests are still in progress
12
12
- If in progress: Report "Tests still running - wait for completion"
13
13
- If all passed: Report "No failures - all tests passed!" and exit
14
-
5. For each failed run, list artifacts: `gh api repos/galaxyproject/galaxy/actions/runs/<RUN_ID>/artifacts --jq '.artifacts[] | {name: .name, id: .id, size_in_bytes: .size_in_bytes}'`
15
-
-**If run has no artifacts:** Report "Run <RUN_ID> has no artifacts - may be too old (artifacts expire after 90 days)"
14
+
5. For each failed run, categorize by artifact availability:
15
+
- List artifacts: `gh api repos/galaxyproject/galaxy/actions/runs/<RUN_ID>/artifacts --jq '.artifacts[] | {name: .name, id: .id, size_in_bytes: .size_in_bytes}'`
16
+
-**If run has test artifacts (HTML/JSON):** Mark for download (test failures)
17
+
-**If run has no artifacts:** Mark for log extraction (likely linting, build, or startup failures)
16
18
6.**Download all test artifacts to review directory**:
17
19
- Prefer JSON artifacts (e.g., "Playwright test results JSON", "Integration test results JSON")
18
20
- Download to `database/pr_reviews/{{arg}}/`
@@ -26,51 +28,71 @@ Steps:
26
28
- If yes, retry with longer timeout (300s)
27
29
- If no or second failure, STOP and report incomplete analysis
28
30
- DO NOT proceed with partial data
29
-
7.**Validate downloads succeeded:**
30
-
- Check if `database/pr_reviews/{{arg}}/` has artifact directories
31
-
- If empty: STOP and report "No artifacts downloaded - download may have failed silently"
31
+
7.**Extract logs from runs without artifacts:**
32
+
- For each run marked for log extraction:
33
+
- Get failed job IDs: `gh api repos/galaxyproject/galaxy/actions/runs/<RUN_ID>/jobs --jq '.jobs[] | select(.conclusion == "failure") | {id: .id, name: .name}'`
34
+
- For each failed job, extract relevant error info:
35
+
- Get job logs: `gh api repos/galaxyproject/galaxy/actions/jobs/<JOB_ID>/logs`
36
+
- Parse for common failure patterns:
37
+
- Python linting: Look for "isort", "flake8", "black", "ruff" errors
38
+
- TypeScript: Look for "tsc", "eslint", "prettier" errors
39
+
- Build failures: Look for "error:", "failed", compilation errors
40
+
- Extract last 20-50 lines of relevant errors
41
+
- Save to `database/pr_reviews/{{arg}}/<RUN_ID>_<JOB_NAME>.log`
42
+
- Include job name and extracted errors in summary
43
+
44
+
8.**Validate downloads succeeded:**
45
+
- Check if `database/pr_reviews/{{arg}}/` has artifact directories OR log files
46
+
- If completely empty: STOP and report "No artifacts or logs extracted - analysis failed"
32
47
- Count expected vs actual artifact directories
33
48
- If mismatch: WARN user about missing artifacts
34
49
35
-
8. Parse test results from all downloaded artifacts:
50
+
9. Parse test results from all downloaded artifacts:
0 commit comments