fix(github): exempt clownfish PRs from active limit closure

This commit is contained in:
Vincent Koc
2026-04-28 19:34:40 -07:00
parent c2e3b6e6f8
commit c65ec4d68c
2 changed files with 43 additions and 0 deletions

View File

@@ -238,6 +238,11 @@ const candidateActionRules = [
const normalizeLogin = (login) => login.toLowerCase();
export function isClownfishPullRequest(pullRequest) {
const headRefName = pullRequest.headRefName ?? pullRequest.head?.ref ?? "";
return typeof headRefName === "string" && headRefName.startsWith("clownfish/");
}
export function extractIssueFormValue(body, field) {
if (!body) {
return "";
@@ -1026,6 +1031,9 @@ export async function runBarnacleAutoResponse({ github, context, core = console
if (pullRequest && labelSet.has(activePrLimitOverrideLabel)) {
labelSet.delete(activePrLimitLabel);
}
if (pullRequest && isClownfishPullRequest(pullRequest)) {
await removeLabels(github, context, pullRequest.number, [activePrLimitLabel], labelSet);
}
const rule = rules.find((item) => labelSet.has(item.label));
if (!rule) {