mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
fix(ci): trust dependency approvers before graph compare (#123456)
This commit is contained in:
committed by
GitHub
parent
860aeed8f6
commit
27c4433939
@@ -792,27 +792,6 @@ async function main() {
|
||||
return;
|
||||
}
|
||||
|
||||
const dependencyGraphChanges = await api.paginate(
|
||||
`/repos/${owner}/${repo}/dependency-graph/compare/${pullRequest.base?.sha}...${pullRequest.head?.sha}`,
|
||||
);
|
||||
if (isRemovalOnlyDependencyGraphChange(dependencyGraphChanges)) {
|
||||
if (mode === "detect") {
|
||||
await setOutput("autoscrub", "false");
|
||||
}
|
||||
await upsertComment(
|
||||
existingGuardComment,
|
||||
renderRemovalOnlyDependencyComment({
|
||||
dependencyGraphChanges,
|
||||
headSha: pullRequest.head?.sha,
|
||||
}),
|
||||
);
|
||||
await writeSummary(
|
||||
"## Dependency Guard\n\nDependency removals are informational and do not require security approval.",
|
||||
);
|
||||
console.log("Dependency removals detected; guard is informational.");
|
||||
return;
|
||||
}
|
||||
|
||||
const { isSecurityMember, isRepositoryAdmin } = createGuardApproverChecks({
|
||||
api,
|
||||
owner,
|
||||
@@ -867,6 +846,27 @@ async function main() {
|
||||
return;
|
||||
}
|
||||
|
||||
const dependencyGraphChanges = await api.paginate(
|
||||
`/repos/${owner}/${repo}/dependency-graph/compare/${pullRequest.base?.sha}...${pullRequest.head?.sha}`,
|
||||
);
|
||||
if (isRemovalOnlyDependencyGraphChange(dependencyGraphChanges)) {
|
||||
if (mode === "detect") {
|
||||
await setOutput("autoscrub", "false");
|
||||
}
|
||||
await upsertComment(
|
||||
existingGuardComment,
|
||||
renderRemovalOnlyDependencyComment({
|
||||
dependencyGraphChanges,
|
||||
headSha: pullRequest.head?.sha,
|
||||
}),
|
||||
);
|
||||
await writeSummary(
|
||||
"## Dependency Guard\n\nDependency removals are informational and do not require security approval.",
|
||||
);
|
||||
console.log("Dependency removals detected; guard is informational.");
|
||||
return;
|
||||
}
|
||||
|
||||
const autoscrubCandidate = shouldAutoscrubDependencyLockfiles({
|
||||
dependencyFiles,
|
||||
lockfileChanges,
|
||||
|
||||
Reference in New Issue
Block a user