Skip to content

Commit 08a8f63

Browse files
committed
Fix maxdepth parameter not being checked properly
1 parent 25ff249 commit 08a8f63

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/actions/src/info/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export async function getAllPackages(gitRoot: string, maxDepth?: number) {
7070
const output: Record<string, RawPackageRecord> = {};
7171

7272
async function recurser(currentDir: string, currentDepth: number) {
73-
if (maxDepth !== undefined && currentDepth >= maxDepth) return;
73+
if (maxDepth !== undefined && currentDepth > maxDepth) return;
7474

7575
const items = await fs.readdir(currentDir, { withFileTypes: true });
7676
await Promise.all(items.map(async item => {
@@ -228,10 +228,11 @@ async function main() {
228228
};
229229

230230
const summaryItems = Object.values(packages).map(packageInfo => {
231+
const relpath = pathlib.relative(gitRoot, packageInfo.directory);
231232
return `<div>
232233
<h2>${packageInfo.name}</h2>
233234
<ul>
234-
<li>Directory: <code>${packageInfo.directory}</code></li>
235+
<li>Directory: <code>${relpath}</code></li>
235236
<li>Changes: <code>${packageInfo.changes}</code></li>
236237
<li>Needs Playwright: <code>${packageInfo.needsPlaywright}</code></li>
237238
</ul>

0 commit comments

Comments
 (0)