Skip to content

Commit 7160424

Browse files
committed
AUTHORS.md update with an updater script
the script is unfortunately is a browser devtools script
1 parent c9bf926 commit 7160424

File tree

2 files changed

+125
-7
lines changed

2 files changed

+125
-7
lines changed

AUTHORS.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,55 @@
1-
# Intersect Authors
1+
# Authors
22

33
[JC Snider](https://github.com/jcsnider)
44

55
[Joe Bridges](https://github.com/irokaiser)
66

77
[Robbie Lodico](https://github.com/lodicolo)
88

9-
# Intersect Maintainers
9+
# Maintainers
1010

1111
[Jocelyn Cobb](https://github.com/Cheshire92)
1212

13-
# Intersect Contributors
13+
# Collaborators
1414

1515
[Alex Vild](https://github.com/AlexVild)
1616

17-
[A. I. Robin](https://github.com/alloin)
17+
[Fernando Arzola Lagos](https://github.com/Arufonsu)
18+
19+
[Weylon Santana](https://github.com/WeylonSantana)
20+
21+
# Contributors
22+
23+
[AIRobin (airobinnet, alloin)](https://github.com/airobinnet)
24+
25+
[AisenGaming](https://github.com/AisenGaming)
26+
27+
[BabyLoves](https://github.com/BabyLoves)
28+
29+
[blinkuz](https://github.com/blinkuz)
30+
31+
[celojevic](https://github.com/celojevic)
1832

1933
[char32](https://github.com/char32)
2034

35+
[DerekGooding](https://github.com/DerekGooding)
36+
37+
[dhmello](https://github.com/dhmello)
38+
2139
[Dog from the Kash Shop](#)
2240

23-
[Fernando Arzola Lagos](https://github.com/Arufonsu)
41+
[dudevelopement](https://github.com/dudevelopement)
42+
43+
[jburditt](https://github.com/jburditt)
44+
45+
[lucas-tardivo](https://github.com/lucas-tardivo)
46+
47+
[Magehernan](https://github.com/Magehernan)
48+
49+
[Mighty-Professional](https://github.com/Mighty-Professional)
50+
51+
[Orinorii](https://github.com/Orinorii)
2452

25-
[Shenmue](https://github.com/RedBandana)
53+
[Shenmue (RedBandana)](https://github.com/RedBandana)
2654

27-
[Mighty Professional](https://github.com/Mighty-Professional)
55+
[TimtyG](https://github.com/TimtyG)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
(() => {
2+
const authors = [
3+
{ username: 'jcsnider', link: 'https://github.com/jcsnider', name: 'JC Snider' },
4+
{ username: 'irokaiser', link: 'https://github.com/irokaiser', name: 'Joe Bridges' },
5+
{ username: 'lodicolo', link: 'https://github.com/lodicolo', name: 'Robbie Lodico' },
6+
];
7+
8+
const maintainers = [
9+
{ username: 'cheshire92', link: 'https://github.com/Cheshire92', name: 'Jocelyn Cobb' },
10+
];
11+
12+
const collaborators = [
13+
{ username: 'alexvild', link: 'https://github.com/AlexVild', name: 'Alex Vild' },
14+
{ username: 'arufonsu', link: 'https://github.com/Arufonsu', name: 'Fernando Arzola Lagos' },
15+
{ username: 'weylonsantana', link: 'https://github.com/WeylonSantana', name: 'Weylon Santana' },
16+
];
17+
18+
const usernamesToIgnore = new Set([
19+
'AlexVild',
20+
'alloin', /* listed under a different name */
21+
'Arufonsu',
22+
'Cheshire92',
23+
'apps/dependabot', /* bot */
24+
'Irokaiser',
25+
'jcsnider',
26+
'lodicolo',
27+
'WeylonSantana'
28+
].map(username => username.toLowerCase()));
29+
30+
const contributorsToAdd = [
31+
{
32+
link: '#',
33+
name: 'Dog from the Kash Shop',
34+
username: 'dog-from-the-kash-shop', /* used for sorting */
35+
}
36+
]
37+
38+
const mappedNames = new Map([
39+
['airobinnet', 'AIRobin (airobinnet, alloin)'],
40+
['redbandana', 'Shenmue (RedBandana)']
41+
]);
42+
43+
function getUsername(url) {
44+
return url.replace('https://github.com/', '').toLowerCase();
45+
}
46+
47+
function userToLine({ name, link }) {
48+
return `[${name}](${link})`;
49+
}
50+
51+
const contributorLinks = [...document.querySelector('[app-name=repos-contributors-chart]')?.querySelectorAll('h2 a.prc-Link-Link-85e08') ?? []];
52+
const allContributors = [
53+
...contributorsToAdd,
54+
...contributorLinks.map(({ href, textContent }) => {
55+
const username = getUsername(href);
56+
return {
57+
link: href,
58+
name: mappedNames.get(username) ?? textContent,
59+
username
60+
};
61+
}),
62+
];
63+
64+
const filteredContributors = allContributors.filter(({ username }) => !usernamesToIgnore.has(username));
65+
const sortedContributors = filteredContributors.toSorted(({ username: a }, { username: b }) => a?.localeCompare(b));
66+
67+
return {
68+
'AUTHORS.md': `# Authors
69+
70+
${authors.map(userToLine).join('\n\n')}
71+
72+
# Maintainers
73+
74+
${maintainers.map(userToLine).join('\n\n')}
75+
76+
# Collaborators
77+
78+
${collaborators.map(userToLine).join('\n\n')}
79+
80+
# Contributors
81+
82+
${sortedContributors.map(userToLine).join('\n\n')}`,
83+
creditsObjects: sortedContributors.map(({ name }) => ({
84+
"Text": name,
85+
"Font": "sourcesansproblack",
86+
"Size": 12,
87+
"Alignment": "center"
88+
})),
89+
};
90+
})()

0 commit comments

Comments
 (0)