@virling/ciwhy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/README.md +7 -0
- package/package.json +1 -1
- package/src/ciwhy.js +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.1] - 2026-11-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- A job whose log GitHub has deleted (after about 90 days) is shown as `log unavailable` instead of stopping the whole report.
|
|
12
|
+
|
|
7
13
|
## [0.1.0] - 2026-11-27
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -12,5 +18,6 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
12
18
|
- Flaky verdict per job: passed on a later attempt, passed on another run of the same commit, or new since the last default-branch run.
|
|
13
19
|
- Pick a run by id, URL, `--pr` or `--branch`; `--rerun` re-runs failed jobs and reports the result; `--json` output.
|
|
14
20
|
|
|
15
|
-
[Unreleased]: https://github.com/virling/ciwhy/compare/v0.1.
|
|
21
|
+
[Unreleased]: https://github.com/virling/ciwhy/compare/v0.1.1...HEAD
|
|
22
|
+
[0.1.1]: https://github.com/virling/ciwhy/compare/v0.1.0...v0.1.1
|
|
16
23
|
[0.1.0]: https://github.com/virling/ciwhy/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -64,6 +64,13 @@ Exit code is 0 after a report, even when jobs failed. It is non-zero only for us
|
|
|
64
64
|
- Node.js 20 or newer
|
|
65
65
|
- [GitHub CLI](https://cli.github.com/) (`gh`), authenticated with `gh auth login`
|
|
66
66
|
|
|
67
|
+
## More tools from Virling
|
|
68
|
+
|
|
69
|
+
- [agentmem](https://github.com/virling/agentmem): project memory for AI coding agents, shared across Claude Code, Cursor, Codex and other MCP clients.
|
|
70
|
+
- [ccdoctor](https://github.com/virling/ccdoctor): checks your Claude Code setup: hooks, MCP servers and plugins that are registered but not working.
|
|
71
|
+
- [npmship](https://github.com/virling/npmship): releases an npm package and verifies it landed on npm, in CI and on GitHub.
|
|
72
|
+
- [subagents](https://github.com/virling/subagents): reviews what Claude Code subagents did in a session and flags repeated or wasted work.
|
|
73
|
+
|
|
67
74
|
## License
|
|
68
75
|
|
|
69
76
|
[PolyForm Noncommercial 1.0.0](LICENSE)
|
package/package.json
CHANGED
package/src/ciwhy.js
CHANGED
|
@@ -61,6 +61,15 @@ function evidence(gh, repo, target, jobs) {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// GitHub deletes job logs after about 90 days, so one missing log must not stop the report.
|
|
65
|
+
function jobLog(gh, repo, id) {
|
|
66
|
+
try {
|
|
67
|
+
return { lines: extractErrors(cleanLog(gh(["api", "--allow-escape-sequences", `repos/${repo}/actions/jobs/${id}/logs`]))) };
|
|
68
|
+
} catch (err) {
|
|
69
|
+
return { lines: [], logError: String(err.stderr || err.message).trim().split("\n")[0] };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
64
73
|
export function analyze(gh, repo, target) {
|
|
65
74
|
const jobs = allJobs(gh, repo, target.id);
|
|
66
75
|
const judge = evidence(gh, repo, target, jobs);
|
|
@@ -74,7 +83,7 @@ export function analyze(gh, repo, target) {
|
|
|
74
83
|
url: job.html_url,
|
|
75
84
|
step: job.steps?.find((s) => FAILED.includes(s.conclusion))?.name ?? null,
|
|
76
85
|
...judge(job),
|
|
77
|
-
|
|
86
|
+
...jobLog(gh, repo, job.id),
|
|
78
87
|
})),
|
|
79
88
|
};
|
|
80
89
|
}
|
|
@@ -104,7 +113,8 @@ export function render(report) {
|
|
|
104
113
|
if (!report.jobs.length) out.push("", "No failed jobs in any attempt.");
|
|
105
114
|
for (const job of report.jobs) {
|
|
106
115
|
out.push("", `FAILED ${job.name} attempt ${job.attempt}${job.step ? ` step: ${job.step}` : ""}`, ` ${job.verdict}: ${job.evidence}`, ` ${job.url}`, "");
|
|
107
|
-
|
|
116
|
+
const empty = job.logError ? `(log unavailable: ${job.logError})` : "(no error lines found in the log)";
|
|
117
|
+
out.push(...(job.lines.length ? job.lines : [empty]).map((l) => ` ${l}`));
|
|
108
118
|
}
|
|
109
119
|
if (report.rerun) out.push("", renderRerun(report.rerun));
|
|
110
120
|
return out.join("\n");
|