Skip to content

Commit ec39f5f

Browse files
committed
Fix 3pl guard exclusion
1 parent 84fe5d8 commit ec39f5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/3pl-guard.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,13 @@ jobs:
124124
});
125125
126126
// Ignore package.json under test fixtures (e.g. e2e workspace-detection fixtures)
127-
const fixtureManifestPattern = /[/\\]test[/\\].*[/\\]fixtures[/\\].*package\.json$/i;
127+
const isTestFixtureManifest = (filename) =>
128+
filename.endsWith('package.json') &&
129+
filename.includes('/test/') &&
130+
filename.includes('/fixtures/');
128131
const changedPackageJsonFiles = files
129132
.map((file) => file.filename)
130-
.filter((filename) => filename.endsWith('package.json') && !fixtureManifestPattern.test(filename));
133+
.filter((filename) => filename.endsWith('package.json') && !isTestFixtureManifest(filename));
131134
132135
const findings = [];
133136

0 commit comments

Comments
 (0)