Skip to content

Commit e60354d

Browse files
committed
fix(pm): keep the inventory's listing argv and filter the action files out
The queue guard pins the inventory listing as read once per run by its exact argv, so the reader keeps listing both directories and drops every path outside `.github/workflows/` before it reads one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSxQuMCd6U7w4Rj8jd
1 parent 204cc46 commit e60354d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎scripts/pm/check-governed-merges.mjs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,8 +2086,9 @@ export function readWorkflowDiff({ paths, base, head, inventoryBase = base, git,
20862086
const show = (rev, path) => git(['show', `${rev}:${path}`]);
20872087
let inventory = cache?.get(inventoryBase) ?? null;
20882088
if (inventory === null) {
2089-
// Workflows only: `.github/actions/**` is no register row, so an action used there alone vouches for nothing.
2090-
const files = listAt(inventoryBase, WORKFLOWS_PREFIX).filter((p) => /\.ya?ml$/.test(p));
2089+
// Workflows only: `.github/actions/**` is no register row, so an action used there alone vouches for
2090+
// nothing. The listing argv is unchanged (the queue guard pins it read once per run); the filter drops them.
2091+
const files = listAt(inventoryBase, '.github/workflows', '.github/actions').filter((p) => p.startsWith(WORKFLOWS_PREFIX) && /\.ya?ml$/.test(p));
20912092
inventory = workflowInventory(files.map((p) => ({ path: p, text: show(inventoryBase, p) })));
20922093
cache?.set(inventoryBase, inventory);
20932094
}

0 commit comments

Comments
 (0)