Skip to content

Commit

Permalink
Fix typo and create a single 'Components' element
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLanziani committed Jun 19, 2024
1 parent b9e69c5 commit 40b8ca7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/scripts/generate-weekly-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,17 @@ function generateComponentsLookingForOwnersReportSection(lookingForOwners) {
let count = 0
let section = []

for (const [componetType, components] of Object.entries(lookingForOwners)) {
// NOTE: the newline after <summary> is required for markdown to render correctly
section.push(`<details>
<summary> Components </summary>\n`);
for (const components of Object.values(lookingForOwners)) {
count += Object.keys(components).length
// NOTE: the newline after <summary> is required for markdown to render correctly
section.push(`<details>
<summary> ${componetType}: ${Object.keys(components).length} </summary>\n`);

for (const [componentName, metadatafilePath] of Object.entries(components)) {
section.push(`- [ ] [${componentName}](${path.join("../blob/main/", path.dirname(metadatafilePath))}) `)
}

section.push(`</details>`)
}

section.push(`</details>`)
return {count, section}
}

Expand Down

0 comments on commit 40b8ca7

Please sign in to comment.