
























@@ -833,6 +833,15 @@ function shouldRemoveProofSufficientLabel(
833833return true;
834834}
835835836+const negativeProofLabels = new Set([NEEDS_REAL_BEHAVIOR_PROOF_LABEL, MOCK_ONLY_PROOF_LABEL]);
837+838+function shouldPreserveClawSweeperProofJudgment(context, labelSet) {
839+return (
840+labelSet.has(PROOF_SUFFICIENT_LABEL) &&
841+!["edited", "synchronize"].includes(context.payload.action)
842+);
843+}
844+836845async function applyPullRequestCandidateLabels(github, context, core, pullRequest, labelSet) {
837846const files = await listPullRequestFiles(github, context, pullRequest);
838847const hasExactHeadClawSweeperProof =
@@ -854,8 +863,11 @@ async function applyPullRequestCandidateLabels(github, context, core, pullReques
854863},
855864files,
856865);
866+const candidateLabelsToApply = shouldPreserveClawSweeperProofJudgment(context, labelSet)
867+ ? classifiedLabels.filter((label) => !negativeProofLabels.has(label))
868+ : classifiedLabels;
857869const staleProofLabels = structuralProofLabelValues.filter(
858-(label) => labelSet.has(label) && !classifiedLabels.includes(label),
870+(label) => labelSet.has(label) && !candidateLabelsToApply.includes(label),
859871);
860872if (
861873labelSet.has(PROOF_SUFFICIENT_LABEL) &&
@@ -870,7 +882,14 @@ async function applyPullRequestCandidateLabels(github, context, core, pullReques
870882staleProofLabels.push(PROOF_SUFFICIENT_LABEL);
871883}
872884await removeLabels(github, context, pullRequest.number, staleProofLabels, labelSet);
873-await addMissingLabels(github, context, core, pullRequest.number, classifiedLabels, labelSet);
885+await addMissingLabels(
886+github,
887+context,
888+core,
889+pullRequest.number,
890+candidateLabelsToApply,
891+labelSet,
892+);
874893}
875894876895function isAutomationUser(user, fallbackLogin = "") {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。