Some small cleanups

This commit is contained in:
Bruno Alla 2020-08-10 18:13:42 +01:00
parent 9344038479
commit 673997a389
5 changed files with 5 additions and 2456 deletions

View File

@ -1,34 +0,0 @@
{
"login": "browniebroke",
"id": 861044,
"node_id": "MDQ6VXNlcjg2MTA0NA==",
"avatar_url": "https://avatars1.githubusercontent.com/u/861044?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/browniebroke",
"html_url": "https://github.com/browniebroke",
"followers_url": "https://api.github.com/users/browniebroke/followers",
"following_url": "https://api.github.com/users/browniebroke/following{/other_user}",
"gists_url": "https://api.github.com/users/browniebroke/gists{/gist_id}",
"starred_url": "https://api.github.com/users/browniebroke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/browniebroke/subscriptions",
"organizations_url": "https://api.github.com/users/browniebroke/orgs",
"repos_url": "https://api.github.com/users/browniebroke/repos",
"events_url": "https://api.github.com/users/browniebroke/events{/privacy}",
"received_events_url": "https://api.github.com/users/browniebroke/received_events",
"type": "User",
"site_admin": false,
"name": "Bruno Alla",
"company": "Festicket",
"blog": "https://browniebroke.com",
"location": "London, UK",
"email": null,
"hireable": null,
"bio": null,
"twitter_username": "_BrunoAlla",
"public_repos": 149,
"public_gists": 5,
"followers": 70,
"following": 73,
"created_at": "2011-06-20T07:06:17Z",
"updated_at": "2020-07-27T15:48:03Z"
}

2417
.github/commits.json vendored

File diff suppressed because it is too large Load Diff

View File

@ -28,4 +28,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Contributors
file_pattern: CONTRIBUTORS.md
file_pattern: CONTRIBUTORS.md .github/contributors.json

View File

@ -93,10 +93,7 @@ def main():
profiles_list.append(profile)
output_file_path = ROOT / ".github" / "contributors.json"
output_file_path.write_text(
json.dumps(profiles_list, indent=2, ensure_ascii=False)
)
output_file_path.write_text(json.dumps(profiles_list, indent=2, ensure_ascii=False))
if __name__ == "__main__":

View File

@ -71,11 +71,14 @@ guidance and advice.
def main() -> None:
gh = GitHub()
recent_authors = set(gh.iter_recent_authors())
contrib_file = ContributorsJSONFile()
for username in recent_authors:
print(f"Checking if {username} should be added")
if username not in contrib_file and username not in BOT_LOGINS:
user_data = gh.fetch_user_info(username)
contrib_file.add_contributor(user_data)
print(f"Added {username} to contributors")
contrib_file.save()
write_md_file(contrib_file.content)