From 1500df45315dc37dcce45378bc607fbdee4f0187 Mon Sep 17 00:00:00 2001 From: deathpie <10750179+deathpie@users.noreply.github.com> Date: Mon, 23 Nov 2026 21:01:50 -0500 Subject: [PATCH] fix: accept a hook recipe in either half of a check context `lint / flint` is the `lint` reusable workflow's `flint` job; C5.7 now accepts a hook recipe named by the workflow or the job. Co-Authored-By: Claude Opus 5.5 --- scripts/fleet-audit.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/fleet-audit.ts b/scripts/fleet-audit.ts index 3a1d002..a3d7c7e 100644 --- a/scripts/fleet-audit.ts +++ b/scripts/fleet-audit.ts @@ -146,11 +146,17 @@ const hookRecipes = [ ]; const hookRecipePattern = new RegExp(`^(${hookRecipes.join("|")})[\\s(]`); -function isHookRecipe(context: string): boolean { - const name = jobPart(context).toLowerCase(); - if (hookRecipes.includes(name)) return true; +function isRecipeName(name: string): boolean { // A matrix or shard suffix keeps the recipe: `test (unit)`, `fmt fast`. - return hookRecipePattern.test(name); + return hookRecipes.includes(name) || hookRecipePattern.test(name); +} + +// A `workflow / job` context counts when either half names a hook recipe: +// `lint / flint` is the `lint` reusable workflow's job. +function isHookRecipe(context: string): boolean { + const name = context.trim().toLowerCase(); + if (isRecipeName(jobPart(name))) return true; + return name.includes(" / ") && isRecipeName(name.slice(0, name.indexOf(" / "))); } // The owner standard's `## CI-only required checks` section names the required