ci: limit PR reviews to evidenced material findings
This commit is contained in:
1 parent
c9a7bffc1d
commit
7938f4dcad
4 files changed
+97
-32
No files matched your search
@@ -24,10 +24,10 @@ export const english = {
|
||||
conflict: "GitHub detected merge conflicts. Resolve them and request another review.",
|
||||
mainMoved: "The default branch moved during review. Review against the new commit.",
|
||||
ciRequired: "Wait for passing CI and evidence of key tests.",
|
||||
fixFindings: "Address the actionable findings below before merging.",
|
||||
pendingRequired: "Run the key checks listed above.",
|
||||
incomplete: "Review the remaining changes before merging.",
|
||||
inline: "Inline findings",
|
||||
unlocated: "Findings could not be anchored to a reviewed line.",
|
||||
noFindings: "No actionable issues found in the reviewed changes.",
|
||||
noDiff: "No text diff was available to review.",
|
||||
inlineFallback: "GitHub could not attach inline comments. See the findings below.",
|
||||
@@ -59,10 +59,10 @@ export const chinese = {
|
||||
conflict: "GitHub 检测到合并冲突,解决后重新审核。",
|
||||
mainMoved: "主线已更新,请对照新的主线提交重新审核。",
|
||||
ciRequired: "等待对应提交的 CI 和关键测试记录。",
|
||||
fixFindings: "合并前处理下方有证据的实质问题。",
|
||||
pendingRequired: "完成上面列出的关键流程实测。",
|
||||
incomplete: "本次只覆盖部分差异,合并前补齐审查。",
|
||||
inline: "行内问题",
|
||||
unlocated: "审核建议未能定位到已审核的改动行。",
|
||||
noFindings: "已审核的差异中未发现可报告的问题。",
|
||||
noDiff: "没有可审核的文本差异。",
|
||||
inlineFallback: "GitHub 未能附加行内评论,审核意见如下。",
|
||||
|
||||
@@ -10,7 +10,7 @@ const MAX_DIFF_LENGTH = 400_000;
|
||||
const MAX_FILE_LENGTH = 36_000;
|
||||
const CI_WAIT_MS = 240_000;
|
||||
const CI_APPEAR_WAIT_MS = 60_000;
|
||||
const MAX_FINDINGS = 5;
|
||||
const MAX_FINDINGS = 3;
|
||||
const MAX_PENDING_CHECKS = 3;
|
||||
const MAX_PREVIOUS_COMMENTS = 8;
|
||||
const MARKER_PREFIX = "<!-- reims-pr-review ";
|
||||
@@ -18,6 +18,7 @@ const SKIP_CI_PATTERN = /\[(?:skip ci|ci skip|no ci|skip actions|actions skip)\]
|
||||
const HUNK = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/;
|
||||
const REVIEW_SECTIONS = ["value", "upgrade", "ui", "implementation"];
|
||||
const DECISIONS = new Set(["merge", "changes", "verify", "decline"]);
|
||||
const FINDING_IMPACTS = new Set(["correctness", "data", "security", "compatibility", "build", "performance"]);
|
||||
const FINISH_REASONS = new Set(["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]);
|
||||
|
||||
function required(name) {
|
||||
@@ -70,7 +71,7 @@ export function shouldSkipAutoReview({ isManual, draft, commitMessage }) {
|
||||
}
|
||||
|
||||
export function diffAnchors(patch) {
|
||||
const anchors = new Set();
|
||||
const anchors = new Map();
|
||||
let left = 0;
|
||||
let right = 0;
|
||||
for (const row of patch.split("\n")) {
|
||||
@@ -79,11 +80,11 @@ export function diffAnchors(patch) {
|
||||
left = Number(hunk[1]);
|
||||
right = Number(hunk[2]);
|
||||
} else if (row.startsWith("+")) {
|
||||
anchors.add("RIGHT:" + right++);
|
||||
anchors.set("RIGHT:" + right++, { text: row.slice(1), changed: true });
|
||||
} else if (row.startsWith("-")) {
|
||||
anchors.add("LEFT:" + left++);
|
||||
anchors.set("LEFT:" + left++, { text: row.slice(1), changed: true });
|
||||
} else if (row.startsWith(" ")) {
|
||||
anchors.add("RIGHT:" + right++);
|
||||
anchors.set("RIGHT:" + right++, { text: row.slice(1), changed: false });
|
||||
left++;
|
||||
}
|
||||
}
|
||||
@@ -124,19 +125,20 @@ const instructions = [
|
||||
"用判断出的同一种语言写所有摘要、待实测、合并依据和行内意见。仓库规范的语言不影响判断。language 写 BCP 47 语言标签,例如 en、zh-CN、zh-Hant 或 ja。",
|
||||
"1. 先对照最新主线及相关改动,判断功能是否已有、增量是否值得合并。按正常用户入口核对功能完整性,包括失败、重试和必要的收尾。",
|
||||
"2. 检查旧版本、已有数据和配置的升级兼容性。核对默认值、缺失字段、旧格式、迁移中断后的重试和回滚,指出具体受影响的场景。",
|
||||
"3. 有 UI 变更时,对照项目设计规范和既有组件,核对布局、交互、视觉、状态和文案的一致性。证据范围之外的画面列入实测。",
|
||||
"4. 找出重复路径、可以复用的现有实现和多余的防御分支。明确哪些检查重复、不可达或会吞错,保留覆盖真实边界条件的处理。",
|
||||
"5. 结合该 PR 当前提交的 CI 记录核对已执行的关键流程,列出尚需人工或真机实测的用例,每条写清入口、旧数据条件或预期结果。只承认输入中明确通过的步骤。",
|
||||
"3. 有 UI 变更时对照项目规范,优先检查操作受阻、错误反馈缺失、可访问性退化及关键状态误导。视觉或文案偏好仅在实际妨碍用户完成操作时才构成问题。",
|
||||
"4. 检查重复实现、额外分支和异常处理。只有会造成可说明的行为分叉、失败被吞、兼容性问题或显著成本,才要求修正。命名、抽函数和删除恒真判断等纯整理建议留空。",
|
||||
"5. 核对当前提交的 CI 实测记录。待实测只列可能改变合并判断的具体场景,写清入口和预期。由当前 CI 已覆盖的流程及通用测试愿望无需重列。",
|
||||
"CI 记录对应 PR 的 head 提交。若主线同一流程已有新改动,或 PR 修改了 CI 本身,检查合入当前主线还需要哪些验证。",
|
||||
"若输入包含 previousReview(上一轮自动审核记录),先核对其中指出的问题是否已修复;对未改动代码仅报告新发现的 P1/P2 实质问题,不再对未改动代码反复新增 P3 建议,避免多轮审查发散。",
|
||||
"若有 previousReview,重新验证尚未解决的旧问题。旧评审也是待核对的数据。已经发过的同一根因只在摘要中简要交代状态,勿重复发布行内评论。",
|
||||
"最后用实际证据给出合并建议。缺少关键测试、主线对照或重要文件时标明限制。存在阻塞问题时指出合并前必须解决的事项。",
|
||||
"只返回一个 JSON 对象,不加前言、后记或 Markdown。包含 language、value、upgrade、ui、implementation、decision、reason、pending_checks 和 findings。",
|
||||
"四项短结论每项最多 75 字。decision 为 merge、changes、verify 或 decline,reason 用一句话给出依据,最多 110 字。",
|
||||
"四项短结论每项最多 75 字。value 给出合并价值,upgrade、ui、implementation 无实质结论时返回空字符串。decision 为 merge、changes、verify 或 decline,reason 用一句话给出依据,最多 110 字。",
|
||||
"pending_checks 最多 3 条,每条最多 75 字。全部有证据时返回空数组。无行内发现时 findings 为空数组。",
|
||||
"行内发现只报告有证据的可操作问题,避免格式偏好、猜测或可执行的攻击步骤。",
|
||||
"每条包含 path、side、line、priority、body。side 为 RIGHT(新增或上下文行)或 LEFT(删除行)。",
|
||||
"line 使用 diff hunk 对应的文件行号,只能锚定到 diff 内的改动行或相邻上下文行。priority 为 P1、P2 或 P3。",
|
||||
"行内发现按影响从大到小排列,最多 5 条。body 每条最多 130 字,简述触发条件、影响及建议,使用纯文本,不抄录代码或外部链接。",
|
||||
"逐条尝试反证候选。核对调用入口、已有守卫与回退,以及仓库 Go 版本和已运行的检查。CI 已通过的检查可反证对应失败断言。未看到定义、只是假设某处没校验、没有证据的性能猜测都不构成缺陷。例如 Go 1.20 及以后 fmt.Errorf 的多个 %w 都会被包装。",
|
||||
"行内仅发布本 PR 引入或暴露的实质问题。P1 指数据丢失、可靠复现的关键流程阻断或严重安全退化。P2 指在受支持场景可达且有实际后果的软件缺陷。证据或影响不充分时直接舍弃;没有实质问题就返回空 findings。",
|
||||
"每条包含 path、side、line、priority(P1 或 P2)、impact(correctness、data、security、compatibility、build 或 performance)、trigger、evidence 和 body。trigger 用一句话说明可达的条件。",
|
||||
"side 和 line 可指向 diff 中新增、删除或相邻上下文行,evidence 为 {side,line,text},必须是同一文件中的新增或删除行。text 为该行的原样代码片段,去掉差异前缀,至少 6 个字符,无 Markdown。",
|
||||
"每个根因一条,按实际影响降序排列,最多 3 条。body 每条最多 130 字,说明触发条件、实际后果及最小修法,使用纯文本,不提供可执行的攻击步骤。",
|
||||
"如果差异为空,如实说明覆盖限制并选择 verify。",
|
||||
"结果语言为英语或简体中文时省略 labels。其他语言须返回 labels 对象,沿用下列键,将各值翻译为结果语言。保持短标签简洁。",
|
||||
JSON.stringify(english),
|
||||
@@ -242,7 +244,7 @@ async function reviewDiffs(context, includeDesignGuidelines) {
|
||||
}
|
||||
const answer = text.map((event) => event.part.text).join("\n");
|
||||
const decoded = parseReviewJSON(answer);
|
||||
if (!REVIEW_SECTIONS.every((key) => typeof decoded?.[key] === "string" && decoded[key].trim())
|
||||
if (!REVIEW_SECTIONS.every((key) => typeof decoded?.[key] === "string") || !decoded.value.trim()
|
||||
|| typeof decoded.language !== "string" || !/^[a-z]{2,3}(?:-[a-z0-9]{2,8})*$/i.test(decoded.language)
|
||||
|| !DECISIONS.has(decoded.decision)
|
||||
|| typeof decoded.reason !== "string" || !decoded.reason.trim()
|
||||
@@ -291,11 +293,15 @@ export function inlineComments(findings, locations) {
|
||||
const seen = new Set();
|
||||
for (const finding of findings) {
|
||||
if (comments.length === MAX_FINDINGS) break;
|
||||
if (!finding || !Number.isSafeInteger(finding.line)
|
||||
|| !["LEFT", "RIGHT"].includes(finding.side)
|
||||
|| !locations.get(finding.path)?.has(finding.side + ":" + finding.line)
|
||||
|| !["P1", "P2", "P3"].includes(finding.priority)
|
||||
if (!finding || !["P1", "P2"].includes(finding.priority) || !FINDING_IMPACTS.has(finding.impact)
|
||||
|| typeof finding.trigger !== "string" || !finding.trigger.trim()
|
||||
|| typeof finding.body !== "string" || !finding.body.trim()) continue;
|
||||
const anchors = locations.get(finding.path);
|
||||
const evidence = finding.evidence;
|
||||
const source = anchors?.get(evidence?.side + ":" + evidence?.line);
|
||||
const excerpt = typeof evidence?.text === "string" ? evidence.text.trim() : "";
|
||||
if (!Number.isSafeInteger(finding.line) || !anchors?.has(finding.side + ":" + finding.line)
|
||||
|| !Number.isSafeInteger(evidence?.line) || !source?.changed || excerpt.length < 6 || !source.text.includes(excerpt)) continue;
|
||||
const { path, side, line } = finding;
|
||||
const key = JSON.stringify([path, side, line]);
|
||||
if (seen.has(key)) continue;
|
||||
@@ -447,9 +453,10 @@ async function mainlineContext(github, repoPath, pull, files) {
|
||||
};
|
||||
}
|
||||
|
||||
export function reviewSummary(copy, assessment, ci, incomplete, mainMoved, mergeable) {
|
||||
export function reviewSummary(copy, assessment, ci, incomplete, mainMoved, mergeable, hasFindings = false) {
|
||||
const lines = [];
|
||||
for (const key of REVIEW_SECTIONS) {
|
||||
if (!assessment[key].trim()) continue;
|
||||
lines.push("- **" + copy[key] + "** " + plainMarkdown(shortText(assessment[key], 75)));
|
||||
}
|
||||
|
||||
@@ -469,10 +476,21 @@ export function reviewSummary(copy, assessment, ci, incomplete, mainMoved, merge
|
||||
let decision = assessment.decision;
|
||||
let reason = plainMarkdown(shortText(assessment.reason, 110));
|
||||
const hasTestEvidence = ci.conclusion === "success" && ci.steps?.some((step) => step.conclusion === "success");
|
||||
const actualCIFailure = ci.status === "completed" && ["failure", "timed_out"].includes(ci.conclusion);
|
||||
if (mergeable === false) {
|
||||
decision = "changes";
|
||||
reason = copy.conflict;
|
||||
} else if (decision === "merge" && (incomplete || mainMoved || !hasTestEvidence || pending.length)) {
|
||||
} else if (actualCIFailure) {
|
||||
decision = "changes";
|
||||
reason = copy.ciRequired;
|
||||
} else if (decision === "merge" && hasFindings) {
|
||||
decision = "changes";
|
||||
reason = copy.fixFindings;
|
||||
} else if (decision === "changes" && !hasFindings) {
|
||||
decision = "verify";
|
||||
reason = copy.noFindings;
|
||||
}
|
||||
if (decision === "merge" && (incomplete || mainMoved || !hasTestEvidence || pending.length)) {
|
||||
decision = "verify";
|
||||
if (mainMoved) reason = copy.mainMoved;
|
||||
else if (!hasTestEvidence) reason = copy.ciRequired;
|
||||
@@ -543,6 +561,7 @@ export async function run() {
|
||||
head: pull.head.sha,
|
||||
base: { branch: pull.base.ref, reportedSha: pull.base.sha, mergeable: pull.mergeable },
|
||||
mainline: comparison,
|
||||
goVersion: (await readFile("go.mod", "utf8")).match(/^go (\S+)/m)?.[1],
|
||||
coverage: { reviewedFiles: diffs.length, changedFiles: pull.changed_files, partialFiles: partial },
|
||||
ci: { ...ci, changesCIWorkflow: files.some((file) => file.filename === ".github/workflows/ci.yml") },
|
||||
diffs,
|
||||
@@ -556,8 +575,7 @@ export async function run() {
|
||||
const copy = localizedCopy(assessment);
|
||||
const comments = inlineComments(findings, locations);
|
||||
const coverage = copy.scope + " " + diffs.length + "/" + pull.changed_files + (partial ? " (" + partial + " " + copy.partial + ")" : "");
|
||||
const result = comments.length ? copy.inline + " · " + comments.length
|
||||
: findings.length ? copy.unlocated : diffs.length ? copy.noFindings : copy.noDiff;
|
||||
const result = comments.length ? copy.inline + " · " + comments.length : diffs.length ? "" : copy.noDiff;
|
||||
|
||||
const latestPR = await currentPR();
|
||||
if (!latestPR) {
|
||||
@@ -572,11 +590,11 @@ export async function run() {
|
||||
const summary = marker + "\n## " + copy.heading + "\n\n" + copy.mainline + " `" + mainline.sha.slice(0, 12) + "` · " + coverage
|
||||
+ (mainCoverage ? " · " + mainCoverage : "")
|
||||
+ "\n\n" + reviewSummary(copy, assessment, ci, !diffs.length || diffs.length < pull.changed_files || partial > 0
|
||||
|| Boolean(mainCoverage), mainMoved, latestPR.mergeable);
|
||||
|| Boolean(mainCoverage), mainMoved, latestPR.mergeable, comments.length > 0);
|
||||
const review = {
|
||||
event: "COMMENT",
|
||||
commit_id: pull.head.sha,
|
||||
body: summary + "\n\n" + result,
|
||||
body: result ? summary + "\n\n" + result : summary,
|
||||
};
|
||||
if (comments.length) review.comments = comments;
|
||||
try {
|
||||
|
||||
@@ -52,9 +52,12 @@ test("diffAnchors includes added, deleted, and context lines while selectDiffs t
|
||||
|
||||
const comments = inlineComments(
|
||||
[
|
||||
{ path: "a.go", side: "RIGHT", line: 10, priority: "P2", body: "context anchor works" },
|
||||
{ path: "a.go", side: "LEFT", line: 11, priority: "P3", body: "deleted anchor works" },
|
||||
{ path: "a.go", side: "RIGHT", line: 99, priority: "P1", body: "out of range dropped" },
|
||||
{ path: "a.go", side: "RIGHT", line: 10, priority: "P2", impact: "correctness", trigger: "Existing configuration",
|
||||
evidence: { side: "RIGHT", line: 11, text: "newLine" }, body: "Context anchor works" },
|
||||
{ path: "a.go", side: "LEFT", line: 11, priority: "P2", impact: "compatibility", trigger: "Upgrading from an old release",
|
||||
evidence: { side: "LEFT", line: 11, text: "oldLine" }, body: "Deleted anchor works" },
|
||||
{ path: "a.go", side: "RIGHT", line: 99, priority: "P1", impact: "data", trigger: "Restoring a disk",
|
||||
evidence: { side: "RIGHT", line: 11, text: "newLine" }, body: "Out of range is dropped" },
|
||||
],
|
||||
selected.locations,
|
||||
);
|
||||
@@ -63,6 +66,28 @@ test("diffAnchors includes added, deleted, and context lines while selectDiffs t
|
||||
assert.equal(comments[1].side, "LEFT");
|
||||
});
|
||||
|
||||
test("inlineComments drops nits and unsupported evidence and limits findings to three", () => {
|
||||
const patch = "@@ -1 +1,5 @@\n existing guard\n+crash first\n+crash second\n+crash third\n+crash fourth";
|
||||
const locations = new Map([["a.go", diffAnchors(patch)]]);
|
||||
const finding = {
|
||||
path: "a.go", side: "RIGHT", line: 2, priority: "P2", impact: "correctness", trigger: "Starting an existing VM",
|
||||
evidence: { side: "RIGHT", line: 2, text: "crash first" }, body: "Starting an existing VM fails",
|
||||
};
|
||||
const comments = inlineComments([
|
||||
{ ...finding, priority: "P3" },
|
||||
{ ...finding, impact: "style" },
|
||||
{ ...finding, trigger: "" },
|
||||
{ ...finding, evidence: { side: "RIGHT", line: 1, text: "existing guard" } },
|
||||
{ ...finding, evidence: { side: "RIGHT", line: 2, text: "invented cause" } },
|
||||
finding,
|
||||
finding,
|
||||
...["second", "third", "fourth"].map((name, index) => ({
|
||||
...finding, line: index + 3, evidence: { side: "RIGHT", line: index + 3, text: "crash " + name },
|
||||
})),
|
||||
], locations);
|
||||
assert.deepEqual(comments.map(({ line }) => line), [2, 3, 4]);
|
||||
});
|
||||
|
||||
test("extractPreviousReview returns latest bot review with stripped marker and changed files", () => {
|
||||
const reviews = [
|
||||
{
|
||||
@@ -115,3 +140,23 @@ test("reviewSummary overrides merge recommendation on conflicts or missing CI",
|
||||
const noCIText = reviewSummary(chinese, assessment, { status: "unavailable" }, false, false, true);
|
||||
assert.match(noCIText, /待实测后再决定/);
|
||||
});
|
||||
|
||||
test("reviewSummary only recommends fixes for verified findings or CI failures and omits empty sections", () => {
|
||||
const assessment = {
|
||||
value: "Adds a needed feature", upgrade: "", ui: "", implementation: "", decision: "changes",
|
||||
reason: "Refactor the redundant guard", pending_checks: [],
|
||||
};
|
||||
const ci = { status: "completed", conclusion: "success", steps: [{ name: "CI tests", conclusion: "success" }] };
|
||||
const clean = reviewSummary(chinese, assessment, ci, false, false, true);
|
||||
assert.match(clean, /待实测后再决定/);
|
||||
assert.doesNotMatch(clean, /修改后再审/);
|
||||
assert.doesNotMatch(clean, /Refactor|界面规范与风格|实现精简与重复逻辑/);
|
||||
|
||||
const issue = reviewSummary(chinese, { ...assessment, decision: "merge" }, ci, false, false, true, true);
|
||||
assert.match(issue, /修改后再审/);
|
||||
assert.match(issue, /实质问题/);
|
||||
|
||||
const failed = reviewSummary(chinese, assessment, { ...ci, conclusion: "failure" }, false, false, true);
|
||||
assert.match(failed, /修改后再审/);
|
||||
assert.doesNotMatch(failed, /Refactor/);
|
||||
});
|
||||
@@ -56,7 +56,9 @@
|
||||
|
||||
[PR Review](../.github/workflows/pr-review.yml) 在 PR 新建、重新打开、转为就绪或推送新提交时运行,覆盖来自 Fork 的 PR。草稿 PR 以及提交说明包含 `[skip ci]`、`[ci skip]`、`[no ci]`、`[skip actions]` 或 `[actions skip]` 的推送不会触发自动审核,仍可通过手动触发运行。`github-actions[bot]` 提交 `Comment` 类型的 Review,能定位到改动行或相邻上下文行的问题会随附行内评论。审核建议供维护者参考,合并仍按本仓库的人工审查流程执行。
|
||||
|
||||
自动审核先读取默认分支最新提交并对照同路径的主线改动,判断合并价值和功能完整性,再检查旧版数据及配置升级、UI 一致性、重复逻辑和可精简分支。若同一 PR 已有上一轮自动审核记录,本次会把上一轮摘要、行内问题和增量变更文件带入上下文,优先核对旧问题是否已修复,不再对未改动代码反复新增次要建议。审核附上当前 PR 提交的 CI 记录、待实测的关键用例和合并建议。回复优先跟随作者在 PR 正文中实际使用的语言,其次参考标题,无法判断时使用英文。工作流在未检测到 CI 运行时最多等待约一分钟,检测到运行后最多等待约四分钟;CI 的现有 Go、前端、桌面构建及 WebView2 冒烟步骤提供实测证据,宿主机、升级和运行时场景以各自实际覆盖为准。
|
||||
自动审核先对照最新主线判断合并价值与功能完整性,再检查升级兼容性、UI 和实现是否会引入实质回归。行内意见需要指明可达的触发条件、实际影响及对应改动行。格式、命名和单纯的重构建议不发布为行内问题。复审会核对上一轮问题的解决状态,避免重复发布同一根因。
|
||||
|
||||
审核附上当前 PR 提交的 CI 记录、会影响合并判断的待实测场景和合并建议。回复优先跟随作者在 PR 正文中实际使用的语言,其次参考标题,无法判断时使用英文。工作流在未检测到 CI 运行时最多等待约一分钟,检测到运行后最多等待约四分钟。CI 的现有 Go、前端、桌面构建及 WebView2 冒烟步骤提供实测证据,宿主机、升级和运行时场景以各自实际覆盖为准。
|
||||
|
||||
在目标仓库的 **Settings → Secrets and variables → Actions** 配置以下项目。
|
||||
|
||||
@@ -68,4 +70,4 @@
|
||||
|
||||
如果公开仓库的 Actions 事件策略阻止 `pull_request_target`,由仓库管理员在 **Settings → Actions → Policies** 为 `.github/workflows/pr-review.yml` 配置允许该事件的策略。工作流从默认分支加载审核脚本,将 GitHub API 返回的差异作为文本交给 [OpenCode](https://docs.bigmodel.cn/cn/coding-plan/tool/opencode),模型工具全部禁用。GitHub 写入权限仅用于提交审核意见。[GitHub 事件策略文档](https://docs.github.com/en/actions/how-tos/administer/control-workflow-execution)
|
||||
|
||||
工作流合入默认分支并配置密钥后,可在 **Actions → PR Review → Run workflow** 输入一个开放 PR 的编号。单次读取最多 300 个变更文件,PR 文本差异总量约 40 万字符,单文件约 3.6 万字符。审核会显示范围,使用 512,000 tokens 的模型上下文预算和 32,768 tokens 的输出上限。请求采用低档推理强度,给审核正文保留输出预算。公开审核摘要包含四项短结论和最多三条待实测项,随附最多五条行内意见。PR 版本、对照主线和 CI 结果相同时会跳过重复审核。缺少密钥时跳过,模型请求或发布失败时在 Actions 中显示失败。
|
||||
工作流合入默认分支并配置密钥后,可在 **Actions → PR Review → Run workflow** 输入一个开放 PR 的编号。单次读取最多 300 个变更文件,PR 文本差异总量约 40 万字符,单文件约 3.6 万字符。审核会显示范围,使用 512,000 tokens 的模型上下文预算和 32,768 tokens 的输出上限。请求采用低档推理强度,给审核正文保留输出预算。公开审核只显示有实质内容的摘要项,随附最多三条待实测项及三条 P1/P2 行内意见。PR 版本、对照主线和 CI 结果相同时会跳过重复审核。缺少密钥时跳过,模型请求或发布失败时在 Actions 中显示失败。
|
||||
Reference in new issue
Block a user