From a47fe7f0d4b6964ac672dda496d113f6b86680a0 Mon Sep 17 00:00:00 2001 From: FonduemangVI Date: Sun, 31 Mar 2024 23:26:14 +1100 Subject: [PATCH] remove bots --- .github/scripts/update-contributors.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/scripts/update-contributors.js b/.github/scripts/update-contributors.js index 8f775534e..564980ca4 100644 --- a/.github/scripts/update-contributors.js +++ b/.github/scripts/update-contributors.js @@ -9,8 +9,12 @@ function indentString(string, indentation) { axios.get('https://api.github.com/repos/FonduemangVI/Guides/contributors') .then((response) => { let contributors = '\n'; + let index = 0; + + response.data.forEach((user) => { + // Exclude bots + if (user.type === 'Bot') return; - response.data.forEach((user, index) => { if (index % 6 === 0) { contributors += ''; } @@ -29,6 +33,8 @@ axios.get('https://api.github.com/repos/FonduemangVI/Guides/contributors') if ((index + 1) % 6 === 0 || index === response.data.length - 1) { contributors += '\n\n'; } + + index++; }); contributors += '
\n';