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:
Vincent Koc
2026-04-29 13:58:06 -07:00
committed by GitHub
parent 3b5dab372a
commit fdf8ffaf3c
3 changed files with 24 additions and 12 deletions

View File

@@ -290,20 +290,26 @@ describe("barnacle-auto-response", () => {
);
});
it("does not close ClawSweeper PRs for the active PR limit", async () => {
for (const headRef of [
{ head: { ref: "clawsweeper/openclaw-openclaw-73880" } },
{ headRefName: "clawsweeper/openclaw-openclaw-73880" },
it("does not close automation PRs for the active PR limit", async () => {
for (const automationPullRequest of [
{ head: { ref: "clawsweeper/openclaw-openclaw-73880" }, login: "app/openclaw-clawsweeper" },
{ headRefName: "clawsweeper/openclaw-openclaw-73880", login: "app/openclaw-clawsweeper" },
{
head: { ref: "clownfish/ghcrawl-156993-autonomous-smoke" },
login: "app/openclaw-clownfish",
},
{ headRefName: "clownfish/ghcrawl-156993-autonomous-smoke", login: "app/openclaw-clownfish" },
]) {
const { calls, github } = barnacleGithub([]);
const { login, ...pullRequest } = automationPullRequest;
await runBarnacleAutoResponse({
github,
context: barnacleContext(
{
...headRef,
...pullRequest,
user: {
login: "app/openclaw-clawsweeper",
login,
},
},
["r: too-many-prs"],