1
0
mirror of https://github.com/spacebarchat/spacebarchat.git synced 2024-11-09 20:22:45 +01:00

added contributors & script to get all of them

[excluding founders]
This commit is contained in:
xnacly 2021-07-25 15:06:01 +02:00
parent e3b3e52b04
commit 1a3a0635f0
3 changed files with 188 additions and 0 deletions

View File

@ -0,0 +1 @@
auth=""

View File

@ -0,0 +1,137 @@
[
{
"login": "DiegoMagdaleno",
"html_url": "https://github.com/DiegoMagdaleno",
"avatar_url": "https://avatars.githubusercontent.com/u/38844659?v=4"
},
{
"login": "luth31",
"html_url": "https://github.com/luth31",
"avatar_url": "https://avatars.githubusercontent.com/u/49862892?v=4"
},
{
"login": "bloomsirenix",
"html_url": "https://github.com/bloomsirenix",
"avatar_url": "https://avatars.githubusercontent.com/u/66263341?v=4"
},
{
"login": "robigan",
"html_url": "https://github.com/robigan",
"avatar_url": "https://avatars.githubusercontent.com/u/35210888?v=4"
},
{
"login": "notsapinho",
"html_url": "https://github.com/notsapinho",
"avatar_url": "https://avatars.githubusercontent.com/u/52896767?v=4"
},
{
"login": "aryan0078",
"html_url": "https://github.com/aryan0078",
"avatar_url": "https://avatars.githubusercontent.com/u/44253539?v=4"
},
{
"login": "Dekryptor",
"html_url": "https://github.com/Dekryptor",
"avatar_url": "https://avatars.githubusercontent.com/u/4175854?v=4"
},
{
"login": "DankDumpster",
"html_url": "https://github.com/DankDumpster",
"avatar_url": "https://avatars.githubusercontent.com/u/62047267?v=4"
},
{
"login": "Umimaso",
"html_url": "https://github.com/Umimaso",
"avatar_url": "https://avatars.githubusercontent.com/u/48099352?v=4"
},
{
"login": "afeuerstein",
"html_url": "https://github.com/afeuerstein",
"avatar_url": "https://avatars.githubusercontent.com/u/32029275?v=4"
},
{
"login": "jhcpeixoto",
"html_url": "https://github.com/jhcpeixoto",
"avatar_url": "https://avatars.githubusercontent.com/u/34003264?v=4"
},
{
"login": "DarrenAlex",
"html_url": "https://github.com/DarrenAlex",
"avatar_url": "https://avatars.githubusercontent.com/u/43137267?v=4"
},
{
"login": "mafineeek",
"html_url": "https://github.com/mafineeek",
"avatar_url": "https://avatars.githubusercontent.com/u/59805849?v=4"
},
{
"login": "xMuffi0n3xDEV",
"html_url": "https://github.com/xMuffi0n3xDEV",
"avatar_url": "https://avatars.githubusercontent.com/u/45566180?v=4"
},
{
"login": "veselcraft",
"html_url": "https://github.com/veselcraft",
"avatar_url": "https://avatars.githubusercontent.com/u/22993408?v=4"
},
{
"login": "BuilderHD",
"html_url": "https://github.com/BuilderHD",
"avatar_url": "https://avatars.githubusercontent.com/u/43351072?v=4"
},
{
"login": "HugoHead",
"html_url": "https://github.com/HugoHead",
"avatar_url": "https://avatars.githubusercontent.com/u/45836267?v=4"
},
{
"login": "aramodi",
"html_url": "https://github.com/aramodi",
"avatar_url": "https://avatars.githubusercontent.com/u/64416869?v=4"
},
{
"login": "HVEVB",
"html_url": "https://github.com/HVEVB",
"avatar_url": "https://avatars.githubusercontent.com/u/36706634?v=4"
},
{
"login": "boehs",
"html_url": "https://github.com/boehs",
"avatar_url": "https://avatars.githubusercontent.com/u/51836263?v=4"
},
{
"login": "Stylix58",
"html_url": "https://github.com/Stylix58",
"avatar_url": "https://avatars.githubusercontent.com/u/63605602?v=4"
},
{
"login": "actions-user",
"html_url": "https://github.com/actions-user",
"avatar_url": "https://avatars.githubusercontent.com/u/65916846?v=4"
},
{
"login": "ItsNewe",
"html_url": "https://github.com/ItsNewe",
"avatar_url": "https://avatars.githubusercontent.com/u/16577829?v=4"
},
{
"login": "TechnologyClassroom",
"html_url": "https://github.com/TechnologyClassroom",
"avatar_url": "https://avatars.githubusercontent.com/u/14501791?v=4"
},
{
"login": "asdfugil",
"html_url": "https://github.com/asdfugil",
"avatar_url": "https://avatars.githubusercontent.com/u/42699250?v=4"
},
{
"login": "GreenXenith",
"html_url": "https://github.com/GreenXenith",
"avatar_url": "https://avatars.githubusercontent.com/u/24834740?v=4"
},
{
"login": "Ben-D-Anderson",
"html_url": "https://github.com/Ben-D-Anderson",
"avatar_url": "https://avatars.githubusercontent.com/u/63131015?v=4"
}
]

View File

@ -0,0 +1,50 @@
import requests
import json
from config import auth
config = {
"org_name": "fosscord",
"auth": auth
}
headers = {
"Authorization": f"token {config['auth']}",
"User-Agent": config['org_name'],
}
urls = {
"base":f"https://api.github.com/orgs/{config['org_name']}",
"all_repos":f"/repos",
}
contributors = []
contributors_names = ["flam3rboy","xnacly","intevel","stefan080106","timschweiz"]
def get_contributors_url(n):
if n["fork"]:
# * excludes forks
return "none"
return n["contributors_url"]
repos = requests.get(f"{urls['base']}{urls['all_repos']}", headers=headers).json()
repos = list(map(get_contributors_url, repos))
def format_contributor(n):
return {
"login": n["login"],
"html_url": n["html_url"],
"avatar_url": n["avatar_url"],
}
for repo in repos:
if repo == "none":
continue
contr = requests.get(repo, headers=headers).json()
contr = list(map(format_contributor, contr))
for cont in contr:
if not cont["login"].lower() in contributors_names:
contributors_names.append(cont["login"].lower())
contributors.append(cont)
else:
continue
with open("contributors.json","w") as f:
f.write(json.dumps(contributors, indent=4))