Skip to content

Commit

Permalink
github: added default repo creators.
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and zzacharo committed Oct 23, 2023
1 parent ac7542b commit 0c3055d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions site/zenodo_rdm/github/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,24 @@ def metadata(self):
if citation_metadata:
output.update(citation_metadata)

if not output.get("creators"):
# Get owner from Github API
owner = self.get_owner()
if owner:
output.update({"creators": [owner]})

# Default to "Unkwnown"
if not output.get("creators"):
output.update(
{
"creators": [
{
"person_or_org": {
"type": "personal",
"family_name": "Unknown",
},
}
]
}
)
return output

0 comments on commit 0c3055d

Please sign in to comment.