mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:20:43 +00:00
fix(ci): exempt automation PRs from Barnacle PR limit
Treat ClawSweeper and Clownfish head refs as automation PRs for Barnacle's active-PR-limit close path, and cover the behavior with a regression test.
This commit is contained in:
@@ -237,10 +237,14 @@ const candidateActionRules = [
|
||||
];
|
||||
|
||||
const normalizeLogin = (login) => login.toLowerCase();
|
||||
const automationPrHeadPrefixes = ["clawsweeper/", "clownfish/"];
|
||||
|
||||
export function isClawsweeperPullRequest(pullRequest) {
|
||||
export function isAutomationPullRequest(pullRequest) {
|
||||
const headRefName = pullRequest.headRefName ?? pullRequest.head?.ref ?? "";
|
||||
return typeof headRefName === "string" && headRefName.startsWith("clawsweeper/");
|
||||
return (
|
||||
typeof headRefName === "string" &&
|
||||
automationPrHeadPrefixes.some((prefix) => headRefName.startsWith(prefix))
|
||||
);
|
||||
}
|
||||
|
||||
export function extractIssueFormValue(body, field) {
|
||||
@@ -1031,7 +1035,7 @@ export async function runBarnacleAutoResponse({ github, context, core = console
|
||||
if (pullRequest && labelSet.has(activePrLimitOverrideLabel)) {
|
||||
labelSet.delete(activePrLimitLabel);
|
||||
}
|
||||
if (pullRequest && isClawsweeperPullRequest(pullRequest)) {
|
||||
if (pullRequest && isAutomationPullRequest(pullRequest)) {
|
||||
await removeLabels(github, context, pullRequest.number, [activePrLimitLabel], labelSet);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user