From 1769ec0750ae28751797fe444145add52abcd459 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Tue, 17 Dec 2024 17:58:14 +0100 Subject: [PATCH] fix: all contributors --- README.md | 482 ++++++++++++++++++++---------------------------------- runok.js | 41 ++--- 2 files changed, 200 insertions(+), 323 deletions(-) diff --git a/README.md b/README.md index 30db0b2a4..68481248b 100644 --- a/README.md +++ b/README.md @@ -295,316 +295,190 @@ When using Typescript, replace `module.exports` with `export` for autocompletion -
- -
- - DavertMik - -
- - DavertMik - -
- - -
- - kobenguyent - -
- - kobenguyent - -
- - -
- - Vorobeyko - -
- - Vorobeyko - -
- - -
- - reubenmiller - -
- - reubenmiller - -
- -
- - Arhell - -
- - Arhell - -
- -
- - APshenkin - -
- - APshenkin - -
- -
- - fabioel - -
- - fabioel - -
- -
- - pablopaul - -
- - pablopaul - -
- -
- - mirao - -
- - mirao - -
- - -
- - Georgegriff - -
- - Georgegriff - -
- - -
- - KMKoushik - -
- - KMKoushik - -
- - -
- - nikocanvacom - -
- - nikocanvacom - -
- - -
- - elukoyanov - -
- - elukoyanov - -
- - -
- - gkushang - -
- - gkushang - -
- - -
- - thomashohn - -
- - thomashohn - -
- -
- - tsuemura - -
- - tsuemura - -
- - -
- - EgorBodnar - -
- - EgorBodnar - -
- - -
- - VikalpP - -
- - VikalpP - -
- - -
- - elaichenkov - -
- - elaichenkov - -
- - -
- - BorisOsipov - -
- - BorisOsipov - -
- - -
- - ngraf - -
- - ngraf - -
- - -
- - nitschSB - -
- - nitschSB - -
- - -
- - hubidu - -
- - hubidu - -
- - -
- - jploskonka - -
- - jploskonka - -
- - -
- - maojunxyz - -
- - maojunxyz - -
- - -
- - abhimanyupandian - -
- - abhimanyupandian - -
- - -
- - martomo - -
- - martomo - -
- - -
- - hatufacci - -
- - hatufacci - -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + DavertMik
+ DavertMik +
+
+ + kobenguyent
+ kobenguyent +
+
+ + Vorobeyko
+ Vorobeyko +
+
+ + reubenmiller
+ reubenmiller +
+
+ + Arhell
+ Arhell +
+
+ + APshenkin
+ APshenkin +
+
+ + fabioel
+ fabioel +
+
+ + pablopaul
+ pablopaul +
+
+ + mirao
+ mirao +
+
+ + Georgegriff
+ Georgegriff +
+
+ + KMKoushik
+ KMKoushik +
+
+ + nikocanvacom
+ nikocanvacom +
+
+ + elukoyanov
+ elukoyanov +
+
+ + thomashohn
+ thomashohn +
+
+ + gkushang
+ gkushang +
+
+ + tsuemura
+ tsuemura +
+
+ + EgorBodnar
+ EgorBodnar +
+
+ + VikalpP
+ VikalpP +
+
+ + elaichenkov
+ elaichenkov +
+
+ + BorisOsipov
+ BorisOsipov +
+
+ + ngraf
+ ngraf +
+
+ + nitschSB
+ nitschSB +
+
+ + hubidu
+ hubidu +
+
+ + jploskonka
+ jploskonka +
+
+ + maojunxyz
+ maojunxyz +
+
+ + abhimanyupandian
+ abhimanyupandian +
+
+ + martomo
+ martomo +
+
+ + hatufacci
+ hatufacci +
+
+ ## License diff --git a/runok.js b/runok.js index 2b034459c..d7d731610 100755 --- a/runok.js +++ b/runok.js @@ -486,31 +486,34 @@ ${changelog}` ); // Filter out bot accounts + const excludeUsers = ['dependabot[bot]', 'actions-user']; + const filteredContributors = response.data.filter( - (contributor) => !contributor.login.includes('dependabot'), - ).filter( - (contributor) => !contributor.login.includes('actions-user'), + (contributor) => !excludeUsers.includes(contributor.login), ); const contributors = filteredContributors.map((contributor) => { return ` -
- - ${contributor.login} - -
- - ${contributor.login} + + + ${contributor.login}
+ ${contributor.login}
-
- `; +`; }); - // Wrap contributors in a grid container - const contributorsGrid = ` -
- ${contributors.join('\n')} -
+ // Chunk contributors into rows of 4 + const rows = []; + const chunkSize = 4; + for (let i = 0; i < contributors.length; i += chunkSize) { + rows.push(`${contributors.slice(i, i + chunkSize).join('')}`); + } + + // Combine rows into a table + const contributorsTable = ` + + ${rows.join('\n')} +
`; const readmePath = path.join(__dirname, 'README.md'); @@ -523,12 +526,12 @@ ${changelog}` if (match) { const updatedContent = content.replace( contributorsSectionRegex, - `${match[1]}\n${contributorsGrid}\n${match[3]}`, + `${match[1]}\n${contributorsTable}\n${match[3]}` ); fs.writeFileSync(readmePath, updatedContent, 'utf-8'); } else { // If no contributors section exists, add one at the end - content += `\n${contributorsGrid}`; + content += `\n${contributorsTable}`; fs.writeFileSync(readmePath, content, 'utf-8'); }