test auto action

This commit is contained in:
FonduemangVI
2024-03-31 22:54:49 +11:00
parent 7464dfd3e0
commit d1085ace4e
3 changed files with 40 additions and 0 deletions

15
.github/scripts/update-contributors.js vendored Normal file
View File

@@ -0,0 +1,15 @@
const fs = require('fs');
const axios = require('axios');
const owner = 'FonduemangVI';
const repo = 'Guides';
axios.get(`https://api.github.com/repos/${owner}/${repo}/contributors`)
.then(response => {
const contributors = response.data.map(user => `- [@${user.login}](${user.html_url})`).join('\n');
fs.writeFileSync('CONTRIBUTORS.md', `# Contributors\n\n${contributors}\n`);
})
.catch(error => {
console.error(error);
process.exit(1);
});