-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: divisi ambassador e contributor e rimosse due figure * chore: aggiunto link ai contributor * chore: format
- Loading branch information
Showing
6 changed files
with
79 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Lista di Contributor attualmente in carica | ||
|
||
La lista viene compilata in ordine alfabetico e viene tenuta aggiornata dal Discussion Group. | ||
|
||
- [Angela Busato](https://github.com/AngyDev) - (2023-09-30 - Attualmente in carica) | ||
- [Francesco Sciuti](https://github.com/fsciuti) | ||
- [PantaRei](https://github.com/pantarei-mb) | ||
- [Raffaele Colace](https://github.com/rafleze) - (2023-09-30 - Attualmente in carica) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const http = require('https'); | ||
const fs = require('fs'); | ||
const users = JSON.parse(fs.readFileSync('contributors_list.json')); | ||
|
||
const get = async (user) => { | ||
return new Promise((accept, reject) => { | ||
http.get( | ||
{ | ||
host: 'api.github.com', | ||
port: 443, | ||
path: `/users/${user}`, | ||
headers: { | ||
'User-Agent': 'request', | ||
Authorization: `token ${process.env.API_TOKEN}`, | ||
}, | ||
}, | ||
(res) => { | ||
let body = ''; | ||
if (res.statusCode != 200) { | ||
reject(`Got response: ${res.statusCode}`); | ||
return; | ||
} | ||
res.on('data', (d) => (body += d)); | ||
res.on('end', () => { | ||
const user = JSON.parse(body); | ||
accept(user); | ||
}); | ||
} | ||
); | ||
}); | ||
}; | ||
const main = async () => { | ||
const names = []; | ||
|
||
console.log('Lettura in corso...'); | ||
|
||
for (const user of users) { | ||
try { | ||
const result = await get(user.user); | ||
const name = result.name ?? result.login; | ||
const url = result.html_url; | ||
names.push({ name, url, ...user }); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
} | ||
names.sort((a, b) => a.name.localeCompare(b.name)); | ||
|
||
console.log('Contributor attualmente in carica:'); | ||
for (const user of names) { | ||
const header = `[${user.name}](${user.url})`; | ||
console.log(`- ${header}`); | ||
} | ||
}; | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"user": "rafleze" | ||
}, | ||
{ | ||
"user": "pantarei-mb" | ||
}, | ||
{ | ||
"user": "fsciuti" | ||
}, | ||
{ | ||
"user": "AngyDev" | ||
} | ||
] |