mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-31 02:18:08 +00:00
fix(ci): trust dependency approvers before graph compare (#123456)
This commit is contained in:
parent
860aeed8f6
commit
27c4433939
2 changed files with 24 additions and 22 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue