mirror of
https://github.com/TRaSH-Guides/Guides.git
synced 2026-02-05 00:09:14 -06:00
test auto action
This commit is contained in:
15
.github/scripts/update-contributors.js
vendored
Normal file
15
.github/scripts/update-contributors.js
vendored
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user