Skip to content

Commit

Permalink
only consider first author maintainer if e-mail is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Nov 24, 2023
1 parent 5a0a71f commit 843d48b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion codemeta/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ def enrich(g: Graph, res: URIRef, args: AttribDict):
if not g.value(res, SDO.maintainer) and (res, SDO.author,None) in g:
print(f"{HEAD} considering first author as maintainer",file=sys.stderr)
for _,_,o in iter_ordered_list(g, res, SDO.author):
g.add((res, SDO.maintainer, o))
mail = g.value(o,SDO.email)
if mail is not None and str(mail).lower().find("unknown") == -1 and str(mail).lower().find("noreply") == -1 and str(mail).lower().find("no-reply") == -1:
g.add((res, SDO.maintainer, o))
break

maintainers = list(g.triples((res, SDO.maintainer,None)))
Expand Down

0 comments on commit 843d48b

Please sign in to comment.