Repository navigation
feat: FindActionRunByHeadSHA + Reviewers 语义注释(fix #2) - #3
Merged
zy84338719 merged 2 commits intoNov 5, 2026
Merged
Conversation
added 2 commits
November 6, 2026 02:35
- v8 runs 列表无 head_sha 过滤器(文档化参数集证据),不发明 wire 形状; helper 用文档化参数预过滤 + 分页游走 + 客户端匹配,命中即停,50 页封顶 - Assign/UnassignPullRequestReviewers、ResetPullRequestReviewStatus 补 语义注释:wire 词表 assignees、平台语义是 PR 审查指派,与 GitHub/Gitea 的经办人语义相反 - job logs 线路 v0.10.0 已有(GetActionJobLogs/DownloadActionJobLogs), CHANGELOG 指路说明 issue 前提过时 Closes #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
按 issue #2 三条诉求逐一处置:
1. head_sha 过滤 →
FindActionRunByHeadSHA扫描 helperv8 wire 的 runs 列表没有 head_sha 过滤器:docs.gitcode.com「获取仓库所有的流水线的运行记录」文档化 query 参数集只有 event/status/branch/executor/pull_request_id/workflow_id/workflow_name/page/per_page/startTime/endTime,head_sha 只是响应字段(2026-11-06 核对)。按仓里 wire-provenance 纪律不发明过滤器(v0.10.0 刚清理过一轮虚构 wire)。
诚实解法:SDK 侧扫描 helper——调用方给文档化参数(prune)预过滤(如 Branch+Status 的 CI 归因场景),per_page=100 分页游走 + 客户端 head_sha 匹配,命中即停(列表新→旧,新 commit 的 run 通常在第 1 页);50 页封顶;未命中返回
ErrActionRunNotFound哨兵。2. job logs 线路 → 已存在,指路
自 v0.10.0(2026-11-02 v8 重写)就有:
GetActionJobLogs:POST /v8/repos/{o}/{r}/actions/runs/{run_id}/jobs/{job_id}/logs(增量分页 body{step_id, offset, limit, sort})DownloadActionJobLogs:GET …/download-log 归档issue 里的「/actions/jobs/{id}/logs」是 GitHub 形状;v8 把 job 挂在 runs/{run_id}/jobs/{job_id} 下。
3. Reviewers 语义注释
GitCode 文档标题:「指派用户审查 Pull Request」——wire 词表
assignees、平台语义是审查指派;SDK 命名忠于平台语义,与 GitHub/Gitea 的 assignee(经办人)相反。已给Assign/UnassignPullRequestReviewers、ResetPullRequestReviewStatus补显式语义警告。测试
四组新单测(命中带 prune query 断言 / 未命中哨兵 / 跨页 / 空 SHA 不出网);
go test ./...全绿。Closes #2