|
|
@ -13,6 +13,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let contributors = '<table>\n<tr>\n';
|
|
|
|
let contributors = '<table>\n<tr>\n';
|
|
|
|
|
|
|
|
let count = 0;
|
|
|
|
|
|
|
|
|
|
|
|
response.data.forEach((user, index) => {
|
|
|
|
response.data.forEach((user, index) => {
|
|
|
|
if (!user.login || !user.html_url || !user.avatar_url) {
|
|
|
|
if (!user.login || !user.html_url || !user.avatar_url) {
|
|
|
@ -31,9 +32,17 @@
|
|
|
|
// Add a new row every 6th user
|
|
|
|
// Add a new row every 6th user
|
|
|
|
if ((index + 1) % 6 === 0) {
|
|
|
|
if ((index + 1) % 6 === 0) {
|
|
|
|
contributors += '\n</tr>\n<tr>\n';
|
|
|
|
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>';
|
|
|
|
contributors += '</tr>\n</table>';
|
|
|
|
|
|
|
|
|
|
|
|
fs.writeFileSync('CONTRIBUTORS.md', `## Contributors\n\n<!-- readme: contributors -start -->\n${contributors}\n<!-- readme: contributors -end -->\n`);
|
|
|
|
fs.writeFileSync('CONTRIBUTORS.md', `## Contributors\n\n<!-- readme: contributors -start -->\n${contributors}\n<!-- readme: contributors -end -->\n`);
|
|
|
|