Skip to content

Commit

Permalink
Sort contributors by givenName
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidajafarbigloo authored Oct 30, 2024
1 parent bbc7671 commit 77f394c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions meta_creator/github_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def get_contributors_from_repo(owner, repo, token, url):
"email": contributor_email,
})
seen_names.add(contributor_name) # to return unique metadata
return metadata
sorted_metadata = sorted(metadata, key=lambda x: x['givenName'].lower())
return sorted_metadata
else:
print(f"Failed to retrieve commit history: {response.status_code}")
return None
Expand Down Expand Up @@ -173,7 +174,7 @@ def get_github_metadata(url, personal_token_key):
# "publisher": namespaceName,
"keywords": topics,
"downloadUrl": download_url,
"permissions": "",
# "permissions": "",
"readme": readme_url,
"author": [{"@type": "Person",
"givenName": "",
Expand Down

0 comments on commit 77f394c

Please sign in to comment.