Skip to content

Commit

Permalink
only one maintainer currently cf #109
Browse files Browse the repository at this point in the history
  • Loading branch information
Maëlle Salmon committed Apr 23, 2018
1 parent fec19c8 commit 5d683af
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions R/codemeta_description.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,20 @@ codemeta_description <-
# and don't get maintainer twice!
authors <- as.person(descr$get("Author"))
maintainer <- descr$get_maintainer()
maintainer <- as.person(paste(maintainer, "[cre]"))
authors <- authors[!(authors$given == maintainer$given & authors$family == maintainer$family)]
maintainer <- as.person(paste(maintainer))
maintainer$role <- "cre"
authors_strings <- paste(authors$given, authors$family)
maintainer_strings <- paste(maintainer$given, maintainer$family)
# for now only one maintainer
if(length(maintainer) > 1){

authors <- c(authors[!authors_strings %in% maintainer_strings[1]],
maintainer[2:length(maintainer)])
maintainer <- maintainer[1]
}else{
authors <- authors[!authors_strings %in% maintainer_strings]
}

authors <- c(authors, maintainer)
codemeta <-
parse_people(authors, codemeta)
Expand Down

0 comments on commit 5d683af

Please sign in to comment.