mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 09:44:46 +00:00
fix: prevent barnacle vetoing clawsweeper proof
This commit is contained in:
@@ -828,6 +828,16 @@ function isAutomationActor(context) {
|
||||
return isAutomationUser(context.payload.sender, context.actor ?? "");
|
||||
}
|
||||
|
||||
function isClawSweeperProofSufficientLabelEvent(context) {
|
||||
const senderLogin = context.payload.sender?.login ?? context.actor ?? "";
|
||||
return (
|
||||
context.payload.action === "labeled" &&
|
||||
context.payload.label?.name === PROOF_SUFFICIENT_LABEL &&
|
||||
isAutomationUser(context.payload.sender, senderLogin) &&
|
||||
/clawsweeper/i.test(senderLogin)
|
||||
);
|
||||
}
|
||||
|
||||
function isGitHubAppPullRequestAuthor(pullRequest) {
|
||||
return isAutomationUser(pullRequest.user);
|
||||
}
|
||||
@@ -1075,6 +1085,13 @@ export async function runBarnacleAutoResponse({ github, context, core = console
|
||||
return;
|
||||
}
|
||||
|
||||
if (isClawSweeperProofSufficientLabelEvent(context)) {
|
||||
core.info(
|
||||
`Skipping PR auto-response checks for #${pullRequest.number} because ClawSweeper owns ${PROOF_SUFFICIENT_LABEL}.`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isGitHubAppPullRequestAuthor(pullRequest)) {
|
||||
await removeLabels(github, context, pullRequest.number, [activePrLimitLabel], labelSet);
|
||||
core.info(`Skipping active PR limit for GitHub App-authored PR #${pullRequest.number}.`);
|
||||
|
||||
Reference in New Issue
Block a user