mirror of
https://github.com/TRaSH-Guides/Guides.git
synced 2026-02-05 00:09:14 -06:00
test new changes
This commit is contained in:
9
.github/scripts/update-contributors.js
vendored
9
.github/scripts/update-contributors.js
vendored
@@ -13,6 +13,7 @@
|
||||
}
|
||||
|
||||
let contributors = '<table>\n<tr>\n';
|
||||
let count = 0;
|
||||
|
||||
response.data.forEach((user, index) => {
|
||||
if (!user.login || !user.html_url || !user.avatar_url) {
|
||||
@@ -31,9 +32,17 @@
|
||||
// Add a new row every 6th user
|
||||
if ((index + 1) % 6 === 0) {
|
||||
contributors += '\n</tr>\n<tr>\n';
|
||||
count = 0;
|
||||
} else {
|
||||
count++;
|
||||
}
|
||||
});
|
||||
|
||||
// Add empty cells if there are fewer than 6 contributors in the last row
|
||||
for (let i = count; i < 6; i++) {
|
||||
contributors += '<td></td>';
|
||||
}
|
||||
|
||||
contributors += '</tr>\n</table>';
|
||||
|
||||
fs.writeFileSync('CONTRIBUTORS.md', `## Contributors\n\n<!-- readme: contributors -start -->\n${contributors}\n<!-- readme: contributors -end -->\n`);
|
||||
|
||||
Reference in New Issue
Block a user