| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(actions): add gc actions artifact view for artifact detail Reopen-and-deliver #441 (was closed without a merged PR / no mainline code; same anomaly as #449/#450; reopened per AGENTS §9). Add read-only support for the GitCode Actions v8 endpoint GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}. - api: new GetActionsArtifact query via RawREST (v8 path preserved). Reuses the Artifact type from #439; returns typed + raw body so --json preserves all API fields faithfully, mirroring GetActionsRun/GetActionsJob. - cmd: new gc actions artifact view <artifact-id> command (ExactArgs(1)), registered under the artifact parent. --json outputs raw verbatim; human view shows artifact metadata + size (human-readable B/KiB/MiB/GiB) + string-ms-timestamp time formatting (created/updated/expires). - tests: v8 path (with artifact_id), parse (size_bytes int64 + string times), raw fidelity, 404, command param validation + JSON + rendering (asserts "1.0 MiB" + "2026-") + error exit-code-through-%w. Coverage 79.7%. - docs: COMMANDS.md gains an actions artifact view section (noting HTTP 400→exit 2 for bad artifact_id format, distinct from 404→3); README entry. Real-data: infra-test/gctest1 + gctest2 + wangjing_127 all return HTTP 400 "参数类型错误" for bad artifact_id format (exit 2) — the API validates artifact_id format before checking existence. 404→3 path (valid-format artifact_id not found) covered by unit tests with mock 404. Closes #441 Co-Authored-By: opencode (glm-5.2) <noreply@anthropic.com> | 3 个月前 | |
feat(actions): add gc actions artifact view for artifact detail Reopen-and-deliver #441 (was closed without a merged PR / no mainline code; same anomaly as #449/#450; reopened per AGENTS §9). Add read-only support for the GitCode Actions v8 endpoint GET /api/v8/repos/{owner}/{repo}/actions/artifacts/{artifact_id}. - api: new GetActionsArtifact query via RawREST (v8 path preserved). Reuses the Artifact type from #439; returns typed + raw body so --json preserves all API fields faithfully, mirroring GetActionsRun/GetActionsJob. - cmd: new gc actions artifact view <artifact-id> command (ExactArgs(1)), registered under the artifact parent. --json outputs raw verbatim; human view shows artifact metadata + size (human-readable B/KiB/MiB/GiB) + string-ms-timestamp time formatting (created/updated/expires). - tests: v8 path (with artifact_id), parse (size_bytes int64 + string times), raw fidelity, 404, command param validation + JSON + rendering (asserts "1.0 MiB" + "2026-") + error exit-code-through-%w. Coverage 79.7%. - docs: COMMANDS.md gains an actions artifact view section (noting HTTP 400→exit 2 for bad artifact_id format, distinct from 404→3); README entry. Real-data: infra-test/gctest1 + gctest2 + wangjing_127 all return HTTP 400 "参数类型错误" for bad artifact_id format (exit 2) — the API validates artifact_id format before checking existence. 404→3 path (valid-format artifact_id not found) covered by unit tests with mock 404. Closes #441 Co-Authored-By: opencode (glm-5.2) <noreply@anthropic.com> | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 3 个月前 |